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

@.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.131 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.133 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.test3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.135 = 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_64(ptr noundef, i32 noundef, i32 noundef) #3

declare void @sc_map_term_64(ptr noundef) #3

declare i64 @sc_map_del_64(ptr noundef, i64 noundef) #3

declare i64 @sc_map_get_64(ptr noundef, i64 noundef) #3

declare i64 @sc_map_put_64(ptr noundef, i64 noundef, i64 noundef) #3

declare void @sc_map_clear_64(ptr noundef) #3

declare i32 @sc_map_size_64(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @test3() #4 {
  %1 = alloca %struct.sc_map_64, align 8
  %2 = alloca [128 x i64], align 16
  %3 = alloca [128 x i64], align 16
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %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 1024, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, 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 = %60, %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 %63

26:                                               ; preds = %22
  br label %27

27:                                               ; preds = %47, %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 = %44, %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 %47

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

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

43:                                               ; preds = %34
  br label %44

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

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

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

60:                                               ; preds = %49
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !5
  br label %22, !llvm.loop !13

63:                                               ; preds = %25
  %64 = call zeroext i1 @sc_map_init_64(ptr noundef %1, i32 noundef 16, i32 noundef 50)
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  br label %67

66:                                               ; preds = %63
  call void @__assert_fail(ptr noundef @.str.133, ptr noundef @.str.14, i32 noundef 1918, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

67:                                               ; preds = %65
  %68 = call i32 @sc_map_size_64(ptr noundef %1)
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  br label %72

71:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.134, ptr noundef @.str.14, i32 noundef 1919, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

72:                                               ; preds = %70
  %73 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef 0, i64 noundef 0)
  call void @sc_map_clear_64(ptr noundef %1)
  %74 = call i32 @sc_map_size_64(ptr noundef %1)
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  br label %78

77:                                               ; preds = %72
  call void @__assert_fail(ptr noundef @.str.134, ptr noundef @.str.14, i32 noundef 1922, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

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

79:                                               ; preds = %142, %78
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 100
  br i1 %81, label %83, label %82

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

83:                                               ; preds = %79
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %85
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %87, i64 noundef %91)
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !9
  %97 = call i64 @sc_map_get_64(ptr noundef %1, i64 noundef %96)
  store i64 %97, ptr %5, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %99 = load i8, ptr %98, align 2, !tbaa !14, !range !18, !noundef !19
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %102

101:                                              ; preds = %83
  br label %103

102:                                              ; preds = %83
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 1927, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

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

110:                                              ; preds = %103
  br label %112

111:                                              ; preds = %103
  call void @__assert_fail(ptr noundef @.str.131, ptr noundef @.str.14, i32 noundef 1928, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

112:                                              ; preds = %110
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !9
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !9
  %121 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %116, i64 noundef %120)
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef %125)
  store i64 %126, ptr %5, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %128 = load i8, ptr %127, align 2, !tbaa !14, !range !18, !noundef !19
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %131

130:                                              ; preds = %112
  br label %132

131:                                              ; preds = %112
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 1932, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

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

139:                                              ; preds = %132
  br label %141

140:                                              ; preds = %132
  call void @__assert_fail(ptr noundef @.str.131, ptr noundef @.str.14, i32 noundef 1933, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

141:                                              ; preds = %139
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %10, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %10, align 4, !tbaa !5
  br label %79, !llvm.loop !20

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

146:                                              ; preds = %160, %145
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = icmp slt i32 %147, 128
  br i1 %148, label %150, label %149

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

150:                                              ; preds = %146
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !9
  %159 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %154, i64 noundef %158)
  br label %160

160:                                              ; preds = %150
  %161 = load i32, ptr %11, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %11, align 4, !tbaa !5
  br label %146, !llvm.loop !21

163:                                              ; preds = %149
  %164 = call i32 @sc_map_size_64(ptr noundef %1)
  %165 = icmp eq i32 %164, 128
  br i1 %165, label %166, label %167

166:                                              ; preds = %163
  br label %168

167:                                              ; preds = %163
  call void @__assert_fail(ptr noundef @.str.135, ptr noundef @.str.14, i32 noundef 1940, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

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

169:                                              ; preds = %245, %168
  %170 = load i64, ptr %14, align 8, !tbaa !9
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %178, label %172

172:                                              ; preds = %169
  %173 = load i64, ptr %13, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 1
  %175 = load i32, ptr %174, align 8, !tbaa !22
  %176 = zext i32 %175 to i64
  %177 = icmp slt i64 %173, %176
  br label %178

178:                                              ; preds = %172, %169
  %179 = phi i1 [ false, %169 ], [ %177, %172 ]
  br i1 %179, label %181, label %180

180:                                              ; preds = %178
  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 %248

181:                                              ; preds = %178
  %182 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !23
  %184 = load i64, ptr %13, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.sc_map_item_64, ptr %183, i64 %184
  %186 = getelementptr inbounds %struct.sc_map_item_64, ptr %185, i32 0, i32 1
  %187 = load i64, ptr %186, align 8, !tbaa !24
  store i64 %187, ptr %5, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !23
  %190 = load i64, ptr %13, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.sc_map_item_64, ptr %189, i64 %190
  %192 = getelementptr inbounds %struct.sc_map_item_64, ptr %191, i32 0, i32 0
  %193 = load i64, ptr %192, align 8, !tbaa !26
  store i64 %193, ptr %4, align 8, !tbaa !9
  store i64 1, ptr %14, align 8, !tbaa !9
  br label %194

194:                                              ; preds = %243, %181
  %195 = load i64, ptr %14, align 8, !tbaa !9
  %196 = icmp ne i64 %195, 0
  br i1 %196, label %197, label %208

197:                                              ; preds = %194
  %198 = load i64, ptr %13, align 8, !tbaa !9
  %199 = icmp eq i64 %198, -1
  br i1 %199, label %200, label %204

200:                                              ; preds = %197
  %201 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 5
  %202 = load i8, ptr %201, align 8, !tbaa !27, !range !18, !noundef !19
  %203 = trunc i8 %202 to i1
  br i1 %203, label %207, label %204

204:                                              ; preds = %200, %197
  %205 = load i64, ptr %4, align 8, !tbaa !9
  %206 = icmp ne i64 %205, 0
  br i1 %206, label %207, label %208

207:                                              ; preds = %204, %200
  br label %209

208:                                              ; preds = %204, %194
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %209

209:                                              ; preds = %208, %207
  %210 = phi i64 [ 1, %207 ], [ 0, %208 ]
  %211 = icmp ne i64 %210, 0
  br i1 %211, label %212, label %244

212:                                              ; preds = %209
  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 %213

213:                                              ; preds = %233, %212
  %214 = load i32, ptr %15, align 4, !tbaa !5
  %215 = icmp slt i32 %214, 128
  br i1 %215, label %217, label %216

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

217:                                              ; preds = %213
  %218 = load i64, ptr %4, align 8, !tbaa !9
  %219 = load i32, ptr %15, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %220
  %222 = load i64, ptr %221, align 8, !tbaa !9
  %223 = icmp eq i64 %218, %222
  br i1 %223, label %224, label %232

224:                                              ; preds = %217
  %225 = load i64, ptr %5, align 8, !tbaa !9
  %226 = load i32, ptr %15, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !9
  %230 = icmp eq i64 %225, %229
  br i1 %230, label %231, label %232

231:                                              ; preds = %224
  store i8 1, ptr %12, align 1, !tbaa !28
  store i32 21, ptr %8, align 4
  br label %236

232:                                              ; preds = %224, %217
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %15, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %15, align 4, !tbaa !5
  br label %213, !llvm.loop !29

236:                                              ; preds = %231, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %237

237:                                              ; preds = %236
  %238 = load i8, ptr %12, align 1, !tbaa !28, !range !18, !noundef !19
  %239 = trunc i8 %238 to i1
  br i1 %239, label %240, label %241

240:                                              ; preds = %237
  br label %242

241:                                              ; preds = %237
  call void @__assert_fail(ptr noundef @.str.128, ptr noundef @.str.14, i32 noundef 1951, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

242:                                              ; preds = %240
  br label %243

243:                                              ; preds = %242
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %194, !llvm.loop !30

244:                                              ; preds = %209
  br label %245

245:                                              ; preds = %244
  %246 = load i64, ptr %13, align 8, !tbaa !9
  %247 = add nsw i64 %246, 1
  store i64 %247, ptr %13, align 8, !tbaa !9
  br label %169, !llvm.loop !31

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

249:                                              ; preds = %312, %248
  %250 = load i64, ptr %17, align 8, !tbaa !9
  %251 = icmp ne i64 %250, 0
  br i1 %251, label %258, label %252

252:                                              ; preds = %249
  %253 = load i64, ptr %16, align 8, !tbaa !9
  %254 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 1
  %255 = load i32, ptr %254, align 8, !tbaa !22
  %256 = zext i32 %255 to i64
  %257 = icmp slt i64 %253, %256
  br label %258

258:                                              ; preds = %252, %249
  %259 = phi i1 [ false, %249 ], [ %257, %252 ]
  br i1 %259, label %261, label %260

260:                                              ; preds = %258
  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 %315

261:                                              ; preds = %258
  %262 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !23
  %264 = load i64, ptr %16, align 8, !tbaa !9
  %265 = getelementptr inbounds %struct.sc_map_item_64, ptr %263, i64 %264
  %266 = getelementptr inbounds %struct.sc_map_item_64, ptr %265, i32 0, i32 0
  %267 = load i64, ptr %266, align 8, !tbaa !26
  store i64 %267, ptr %4, align 8, !tbaa !9
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %268

268:                                              ; preds = %310, %261
  %269 = load i64, ptr %17, align 8, !tbaa !9
  %270 = icmp ne i64 %269, 0
  br i1 %270, label %271, label %282

271:                                              ; preds = %268
  %272 = load i64, ptr %16, align 8, !tbaa !9
  %273 = icmp eq i64 %272, -1
  br i1 %273, label %274, label %278

274:                                              ; preds = %271
  %275 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 5
  %276 = load i8, ptr %275, align 8, !tbaa !27, !range !18, !noundef !19
  %277 = trunc i8 %276 to i1
  br i1 %277, label %281, label %278

278:                                              ; preds = %274, %271
  %279 = load i64, ptr %4, align 8, !tbaa !9
  %280 = icmp ne i64 %279, 0
  br i1 %280, label %281, label %282

281:                                              ; preds = %278, %274
  br label %283

282:                                              ; preds = %278, %268
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %283

283:                                              ; preds = %282, %281
  %284 = phi i64 [ 1, %281 ], [ 0, %282 ]
  %285 = icmp ne i64 %284, 0
  br i1 %285, label %286, label %311

286:                                              ; preds = %283
  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 %287

287:                                              ; preds = %300, %286
  %288 = load i32, ptr %18, align 4, !tbaa !5
  %289 = icmp slt i32 %288, 128
  br i1 %289, label %291, label %290

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

291:                                              ; preds = %287
  %292 = load i64, ptr %4, align 8, !tbaa !9
  %293 = load i32, ptr %18, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %294
  %296 = load i64, ptr %295, align 8, !tbaa !9
  %297 = icmp eq i64 %292, %296
  br i1 %297, label %298, label %299

298:                                              ; preds = %291
  store i8 1, ptr %12, align 1, !tbaa !28
  store i32 30, ptr %8, align 4
  br label %303

299:                                              ; preds = %291
  br label %300

300:                                              ; preds = %299
  %301 = load i32, ptr %18, align 4, !tbaa !5
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %18, align 4, !tbaa !5
  br label %287, !llvm.loop !32

303:                                              ; preds = %298, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %304

304:                                              ; preds = %303
  %305 = load i8, ptr %12, align 1, !tbaa !28, !range !18, !noundef !19
  %306 = trunc i8 %305 to i1
  br i1 %306, label %307, label %308

307:                                              ; preds = %304
  br label %309

308:                                              ; preds = %304
  call void @__assert_fail(ptr noundef @.str.128, ptr noundef @.str.14, i32 noundef 1962, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

309:                                              ; preds = %307
  br label %310

310:                                              ; preds = %309
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %268, !llvm.loop !33

311:                                              ; preds = %283
  br label %312

312:                                              ; preds = %311
  %313 = load i64, ptr %16, align 8, !tbaa !9
  %314 = add nsw i64 %313, 1
  store i64 %314, ptr %16, align 8, !tbaa !9
  br label %249, !llvm.loop !34

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

316:                                              ; preds = %384, %315
  %317 = load i64, ptr %20, align 8, !tbaa !9
  %318 = icmp ne i64 %317, 0
  br i1 %318, label %325, label %319

319:                                              ; preds = %316
  %320 = load i64, ptr %19, align 8, !tbaa !9
  %321 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 1
  %322 = load i32, ptr %321, align 8, !tbaa !22
  %323 = zext i32 %322 to i64
  %324 = icmp slt i64 %320, %323
  br label %325

325:                                              ; preds = %319, %316
  %326 = phi i1 [ false, %316 ], [ %324, %319 ]
  br i1 %326, label %328, label %327

327:                                              ; preds = %325
  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 %387

328:                                              ; preds = %325
  %329 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 0
  %330 = load ptr, ptr %329, align 8, !tbaa !23
  %331 = load i64, ptr %19, align 8, !tbaa !9
  %332 = getelementptr inbounds %struct.sc_map_item_64, ptr %330, i64 %331
  %333 = getelementptr inbounds %struct.sc_map_item_64, ptr %332, i32 0, i32 1
  %334 = load i64, ptr %333, align 8, !tbaa !24
  store i64 %334, ptr %5, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %335

335:                                              ; preds = %382, %328
  %336 = load i64, ptr %20, align 8, !tbaa !9
  %337 = icmp ne i64 %336, 0
  br i1 %337, label %338, label %354

338:                                              ; preds = %335
  %339 = load i64, ptr %19, align 8, !tbaa !9
  %340 = icmp eq i64 %339, -1
  br i1 %340, label %341, label %345

341:                                              ; preds = %338
  %342 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 5
  %343 = load i8, ptr %342, align 8, !tbaa !27, !range !18, !noundef !19
  %344 = trunc i8 %343 to i1
  br i1 %344, label %353, label %345

345:                                              ; preds = %341, %338
  %346 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !23
  %348 = load i64, ptr %19, align 8, !tbaa !9
  %349 = getelementptr inbounds %struct.sc_map_item_64, ptr %347, i64 %348
  %350 = getelementptr inbounds %struct.sc_map_item_64, ptr %349, i32 0, i32 0
  %351 = load i64, ptr %350, align 8, !tbaa !26
  %352 = icmp ne i64 %351, 0
  br i1 %352, label %353, label %354

353:                                              ; preds = %345, %341
  br label %355

354:                                              ; preds = %345, %335
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %355

355:                                              ; preds = %354, %353
  %356 = phi i64 [ 1, %353 ], [ 0, %354 ]
  %357 = icmp ne i64 %356, 0
  br i1 %357, label %358, label %383

358:                                              ; preds = %355
  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 %359

359:                                              ; preds = %372, %358
  %360 = load i32, ptr %21, align 4, !tbaa !5
  %361 = icmp slt i32 %360, 128
  br i1 %361, label %363, label %362

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

363:                                              ; preds = %359
  %364 = load i64, ptr %5, align 8, !tbaa !9
  %365 = load i32, ptr %21, align 4, !tbaa !5
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %366
  %368 = load i64, ptr %367, align 8, !tbaa !9
  %369 = icmp eq i64 %364, %368
  br i1 %369, label %370, label %371

370:                                              ; preds = %363
  store i8 1, ptr %12, align 1, !tbaa !28
  store i32 39, ptr %8, align 4
  br label %375

371:                                              ; preds = %363
  br label %372

372:                                              ; preds = %371
  %373 = load i32, ptr %21, align 4, !tbaa !5
  %374 = add nsw i32 %373, 1
  store i32 %374, ptr %21, align 4, !tbaa !5
  br label %359, !llvm.loop !35

375:                                              ; preds = %370, %362
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %376

376:                                              ; preds = %375
  %377 = load i8, ptr %12, align 1, !tbaa !28, !range !18, !noundef !19
  %378 = trunc i8 %377 to i1
  br i1 %378, label %379, label %380

379:                                              ; preds = %376
  br label %381

380:                                              ; preds = %376
  call void @__assert_fail(ptr noundef @.str.128, ptr noundef @.str.14, i32 noundef 1973, ptr noundef @__PRETTY_FUNCTION__.test3) #6
  unreachable

381:                                              ; preds = %379
  br label %382

382:                                              ; preds = %381
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %335, !llvm.loop !36

383:                                              ; preds = %355
  br label %384

384:                                              ; preds = %383
  %385 = load i64, ptr %19, align 8, !tbaa !9
  %386 = add nsw i64 %385, 1
  store i64 %386, ptr %19, align 8, !tbaa !9
  br label %316, !llvm.loop !37

387:                                              ; preds = %327
  call void @sc_map_term_64(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #5
  ret void

388:                                              ; preds = %47
  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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !17, i64 26}
!15 = !{!"sc_map_64", !16, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !17, i64 24, !17, i64 25, !17, i64 26}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{!15, !6, i64 8}
!23 = !{!15, !16, i64 0}
!24 = !{!25, !10, i64 8}
!25 = !{!"sc_map_item_64", !10, i64 0, !10, i64 8}
!26 = !{!25, !10, i64 0}
!27 = !{!15, !17, i64 24}
!28 = !{!17, !17, i64 0}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}
!36 = distinct !{!36, !12}
!37 = distinct !{!37, !12}


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

@.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.131 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.133 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.test3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.135 = 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_64(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @sc_map_term_64(ptr noundef) local_unnamed_addr #3

declare i64 @sc_map_del_64(ptr noundef, i64 noundef) local_unnamed_addr #3

declare i64 @sc_map_get_64(ptr noundef, i64 noundef) local_unnamed_addr #3

declare i64 @sc_map_put_64(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare void @sc_map_clear_64(ptr noundef) local_unnamed_addr #3

declare i32 @sc_map_size_64(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @test3() local_unnamed_addr #4 {
  %1 = alloca %struct.sc_map_64, align 8
  %2 = alloca [128 x i64], align 16
  %3 = alloca [128 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1024, 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 %.preheader125.._crit_edge_crit_edge, label %.lr.ph.us

.preheader125.._crit_edge_crit_edge:              ; preds = %.preheader125
  %.pre = zext i32 %4 to i64
  br label %._crit_edge

.lr.ph.us:                                        ; preds = %.preheader125, %.loopexit124.us
  %5 = phi i32 [ %12, %.loopexit124.us ], [ %4, %.preheader125 ]
  %6 = zext i32 %5 to i64
  br label %8

7:                                                ; preds = %8
  %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 %8, !llvm.loop !5

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

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

13:                                               ; preds = %._crit_edge
  %14 = call zeroext i1 @sc_map_init_64(ptr noundef nonnull %1, i32 noundef 16, i32 noundef 50) #5
  br i1 %14, label %20, label %19

._crit_edge:                                      ; preds = %7, %.preheader125.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader125.._crit_edge_crit_edge ], [ %6, %7 ]
  %15 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %indvars.iv148
  store i64 %.pre-phi, ptr %15, align 8, !tbaa !7
  %16 = tail call i32 @rand() #5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %indvars.iv148
  store i64 %17, ptr %18, align 8, !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 %13, label %.preheader125, !llvm.loop !11

19:                                               ; preds = %13
  call void @__assert_fail(ptr noundef nonnull @.str.133, ptr noundef nonnull @.str.14, i32 noundef 1918, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #6
  unreachable

20:                                               ; preds = %13
  %21 = call i32 @sc_map_size_64(ptr noundef nonnull %1) #5
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @__assert_fail(ptr noundef nonnull @.str.134, ptr noundef nonnull @.str.14, i32 noundef 1919, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #6
  unreachable

24:                                               ; preds = %20
  %25 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 0, i64 noundef 0) #5
  call void @sc_map_clear_64(ptr noundef nonnull %1) #5
  %26 = call i32 @sc_map_size_64(ptr noundef nonnull %1) #5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %.preheader123, label %29

.preheader123:                                    ; preds = %24
  %28 = getelementptr inbounds i8, ptr %1, i64 26
  br label %31

29:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str.134, ptr noundef nonnull @.str.14, i32 noundef 1922, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #6
  unreachable

30:                                               ; preds = %50
  %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 %31, !llvm.loop !12

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

40:                                               ; preds = %31
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 1927, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #6
  unreachable

41:                                               ; preds = %31
  %42 = icmp eq i64 %37, %35
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %41
  %45 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef %33, i64 noundef %35) #5
  %46 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef %33) #5
  %47 = load i8, ptr %28, align 2, !tbaa !13, !range !18, !noundef !19
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %50, label %49

49:                                               ; preds = %44
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 1932, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #6
  unreachable

50:                                               ; preds = %44
  %51 = icmp eq i64 %46, %35
  br i1 %51, label %30, label %52

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

53:                                               ; preds = %.preheader122
  %54 = call i32 @sc_map_size_64(ptr noundef nonnull %1) #5
  %55 = icmp eq i32 %54, 128
  br i1 %55, label %.preheader121, label %68

.preheader121:                                    ; preds = %53
  %56 = getelementptr inbounds i8, ptr %1, i64 8
  %57 = load i32, ptr %56, align 8
  %58 = zext i32 %57 to i64
  %59 = load ptr, ptr %1, align 8, !tbaa !20
  %60 = getelementptr inbounds i8, ptr %1, i64 24
  %61 = load i8, ptr %60, align 8, !range !18
  %62 = trunc nuw i8 %61 to i1
  br label %.critedge

.preheader122:                                    ; preds = %30, %.preheader122
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %.preheader122 ], [ 0, %30 ]
  %63 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %indvars.iv156
  %64 = load i64, ptr %63, align 8, !tbaa !7
  %65 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %indvars.iv156
  %66 = load i64, ptr %65, align 8, !tbaa !7
  %67 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef %64, i64 noundef %66) #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 %53, label %.preheader122, !llvm.loop !21

68:                                               ; preds = %53
  call void @__assert_fail(ptr noundef nonnull @.str.135, ptr noundef nonnull @.str.14, i32 noundef 1940, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #6
  unreachable

.critedge:                                        ; preds = %.preheader121, %.loopexit120
  %.083137 = phi i64 [ -1, %.preheader121 ], [ %77, %.loopexit120 ]
  %69 = getelementptr inbounds %struct.sc_map_item_64, ptr %59, i64 %.083137
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !22
  %72 = load i64, ptr %69, align 8, !tbaa !24
  %73 = icmp eq i64 %.083137, -1
  br i1 %73, label %74, label %76

74:                                               ; preds = %.critedge
  %75 = icmp ne i64 %72, 0
  %or.cond = select i1 %62, i1 true, i1 %75
  br i1 %or.cond, label %.preheader119.preheader, label %.loopexit120

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

76:                                               ; preds = %.critedge
  %.old1.not = icmp eq i64 %72, 0
  br i1 %.old1.not, label %.loopexit120, label %.preheader119.preheader

.loopexit120:                                     ; preds = %81, %88, %74, %76
  %77 = add nsw i64 %.083137, 1
  %exitcond164.not = icmp eq i64 %77, %58
  br i1 %exitcond164.not, label %.critedge105, label %.critedge, !llvm.loop !25

.preheader119:                                    ; preds = %92, %.preheader119.preheader
  %indvars.iv160 = phi i64 [ 0, %.preheader119.preheader ], [ %indvars.iv.next161.1, %92 ]
  %78 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %indvars.iv160
  %79 = load i64, ptr %78, align 16, !tbaa !7
  %80 = icmp eq i64 %72, %79
  br i1 %80, label %81, label %.preheader119.1

81:                                               ; preds = %.preheader119
  %82 = getelementptr inbounds [128 x i64], ptr %3, i64 0, i64 %indvars.iv160
  %83 = load i64, ptr %82, align 16, !tbaa !7
  %84 = icmp eq i64 %71, %83
  br i1 %84, label %.loopexit120, label %.preheader119.1

.preheader119.1:                                  ; preds = %.preheader119, %81
  %indvars.iv.next161 = or disjoint i64 %indvars.iv160, 1
  %85 = getelementptr inbounds [128 x i64], ptr %2, i64 0, i64 %indvars.iv.next161
  %86 = load i64, ptr %85, align 8, !tbaa !7
  %87 = icmp eq i64 %72, %86
  br i1 %87, label %88, label %92

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

92:                                               ; preds = %88, %.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 !26

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

.critedge105:                                     ; preds = %.loopexit120, %.loopexit117
  %.078139 = phi i64 [ %99, %.loopexit117 ], [ -1, %.loopexit120 ]
  %93 = getelementptr inbounds %struct.sc_map_item_64, ptr %59, i64 %.078139
  %94 = load i64, ptr %93, align 8, !tbaa !24
  %95 = icmp eq i64 %.078139, -1
  br i1 %95, label %96, label %98

96:                                               ; preds = %.critedge105
  %97 = icmp ne i64 %94, 0
  %or.cond4 = select i1 %62, i1 true, i1 %97
  br i1 %or.cond4, label %.preheader116.preheader, label %.loopexit117

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

98:                                               ; preds = %.critedge105
  %.old3.not = icmp eq i64 %94, 0
  br i1 %.old3.not, label %.loopexit117, label %.preheader116.preheader

.loopexit117:                                     ; preds = %.preheader116, %.preheader116.1, %.preheader116.2, %.preheader116.3, %96, %98
  %99 = add nsw i64 %.078139, 1
  %exitcond169.not = icmp eq i64 %99, %58
  br i1 %exitcond169.not, label %.critedge109, label %.critedge105, !llvm.loop !27

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

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

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

109:                                              ; 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 !28

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

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

113:                                              ; preds = %.loopexit
  call void @sc_map_term_64(ptr noundef nonnull %1) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1024, 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 [ %120, %.loopexit ], [ -1, %.loopexit117 ]
  %114 = getelementptr inbounds %struct.sc_map_item_64, ptr %59, i64 %.073141, i32 1
  %115 = load i64, ptr %114, align 8, !tbaa !22
  %116 = icmp eq i64 %.073141, -1
  %brmerge.not = select i1 %116, i1 %62, i1 false
  br i1 %brmerge.not, label %.preheader.preheader, label %117

117:                                              ; preds = %.critedge109
  %118 = getelementptr inbounds %struct.sc_map_item_64, ptr %59, i64 %.073141
  %119 = load i64, ptr %118, align 8, !tbaa !24
  %.not96 = icmp eq i64 %119, 0
  br i1 %.not96, label %.loopexit, label %.preheader.preheader

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

.loopexit:                                        ; preds = %.preheader, %.preheader.1, %.preheader.2, %.preheader.3, %117
  %120 = add nsw i64 %.073141, 1
  %exitcond174.not = icmp eq i64 %120, %58
  br i1 %exitcond174.not, label %113, label %.critedge109, !llvm.loop !29

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

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

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

130:                                              ; 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 !30

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

.critedge111:                                     ; preds = %130
  call void @__assert_fail(ptr noundef nonnull @.str.128, ptr noundef nonnull @.str.14, i32 noundef 1973, ptr noundef nonnull @__PRETTY_FUNCTION__.test3) #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 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = !{!14, !17, i64 26}
!14 = !{!"sc_map_64", !15, i64 0, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !17, i64 24, !17, i64 25, !17, i64 26}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"int", !9, i64 0}
!17 = !{!"_Bool", !9, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!14, !15, i64 0}
!21 = distinct !{!21, !6}
!22 = !{!23, !8, i64 8}
!23 = !{!"sc_map_item_64", !8, i64 0, !8, i64 8}
!24 = !{!23, !8, i64 0}
!25 = distinct !{!25, !6}
!26 = distinct !{!26, !6}
!27 = distinct !{!27, !6}
!28 = distinct !{!28, !6}
!29 = distinct !{!29, !6}
!30 = distinct !{!30, !6}


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