; 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 }

@.str.14 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.test_64 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [30 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: nounwind
declare void @srand(i32 noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_64() #3 {
  %1 = alloca %struct.sc_map_64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %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
  call void @srand(i32 noundef 2132132131) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #5
  %10 = call zeroext i1 @sc_map_init_64(ptr noundef %1, i32 noundef 0, i32 noundef 0)
  br i1 %10, label %11, label %12

11:                                               ; preds = %0
  br label %13

12:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.60, ptr noundef @.str.14, i32 noundef 853, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

13:                                               ; preds = %11
  call void @sc_map_term_64(ptr noundef %1)
  %14 = call zeroext i1 @sc_map_init_64(ptr noundef %1, i32 noundef 0, i32 noundef 1)
  %15 = zext i1 %14 to i32
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  br label %19

18:                                               ; preds = %13
  call void @__assert_fail(ptr noundef @.str.61, ptr noundef @.str.14, i32 noundef 855, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

19:                                               ; preds = %17
  %20 = call zeroext i1 @sc_map_init_64(ptr noundef %1, i32 noundef 0, i32 noundef 99)
  %21 = zext i1 %20 to i32
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %19
  br label %25

24:                                               ; preds = %19
  call void @__assert_fail(ptr noundef @.str.62, ptr noundef @.str.14, i32 noundef 856, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

25:                                               ; preds = %23
  %26 = call zeroext i1 @sc_map_init_64(ptr noundef %1, i32 noundef 16, i32 noundef 94)
  br i1 %26, label %27, label %28

27:                                               ; preds = %25
  br label %29

28:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.63, ptr noundef @.str.14, i32 noundef 858, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

29:                                               ; preds = %27
  %30 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 0)
  %31 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %32 = load i8, ptr %31, align 2, !tbaa !5, !range !12, !noundef !13
  %33 = trunc i8 %32 to i1
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  br label %36

35:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.14, i32 noundef 861, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

36:                                               ; preds = %34
  %37 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 1)
  %38 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %39 = load i8, ptr %38, align 2, !tbaa !5, !range !12, !noundef !13
  %40 = trunc i8 %39 to i1
  br i1 %40, label %42, label %41

41:                                               ; preds = %36
  br label %43

42:                                               ; preds = %36
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.14, i32 noundef 864, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

43:                                               ; preds = %41
  %44 = call i64 @sc_map_get_64(ptr noundef %1, i64 noundef 0)
  %45 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %46 = load i8, ptr %45, align 2, !tbaa !5, !range !12, !noundef !13
  %47 = trunc i8 %46 to i1
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  br label %50

49:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.14, i32 noundef 867, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

50:                                               ; preds = %48
  %51 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef 0, i64 noundef 200)
  %52 = call i64 @sc_map_get_64(ptr noundef %1, i64 noundef 0)
  %53 = icmp eq i64 %52, 200
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  br label %56

55:                                               ; preds = %50
  call void @__assert_fail(ptr noundef @.str.64, ptr noundef @.str.14, i32 noundef 869, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

56:                                               ; preds = %54
  %57 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %58 = load i8, ptr %57, align 2, !tbaa !5, !range !12, !noundef !13
  %59 = trunc i8 %58 to i1
  br i1 %59, label %60, label %61

60:                                               ; preds = %56
  br label %62

61:                                               ; preds = %56
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 870, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !14
  br label %63

63:                                               ; preds = %73, %62
  %64 = load i32, ptr %2, align 4, !tbaa !14
  %65 = icmp slt i32 %64, 14
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %76

67:                                               ; preds = %63
  %68 = load i32, ptr %2, align 4, !tbaa !14
  %69 = sext i32 %68 to i64
  %70 = load i32, ptr %2, align 4, !tbaa !14
  %71 = sext i32 %70 to i64
  %72 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %69, i64 noundef %71)
  br label %73

73:                                               ; preds = %67
  %74 = load i32, ptr %2, align 4, !tbaa !14
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %2, align 4, !tbaa !14
  br label %63, !llvm.loop !15

76:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 100, ptr %3, align 4, !tbaa !14
  br label %77

77:                                               ; preds = %91, %76
  %78 = load i32, ptr %3, align 4, !tbaa !14
  %79 = icmp slt i32 %78, 200
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %94

81:                                               ; preds = %77
  %82 = load i32, ptr %3, align 4, !tbaa !14
  %83 = sext i32 %82 to i64
  %84 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef %83)
  %85 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %86 = load i8, ptr %85, align 2, !tbaa !5, !range !12, !noundef !13
  %87 = trunc i8 %86 to i1
  br i1 %87, label %89, label %88

88:                                               ; preds = %81
  br label %90

89:                                               ; preds = %81
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.14, i32 noundef 878, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %3, align 4, !tbaa !14
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %3, align 4, !tbaa !14
  br label %77, !llvm.loop !17

94:                                               ; preds = %80
  call void @sc_map_clear_64(ptr noundef %1)
  call void @sc_map_clear_64(ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !14
  br label %95

95:                                               ; preds = %105, %94
  %96 = load i32, ptr %4, align 4, !tbaa !14
  %97 = icmp slt i32 %96, 5
  br i1 %97, label %99, label %98

98:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %108

99:                                               ; preds = %95
  %100 = load i32, ptr %4, align 4, !tbaa !14
  %101 = sext i32 %100 to i64
  %102 = load i32, ptr %4, align 4, !tbaa !14
  %103 = sext i32 %102 to i64
  %104 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %101, i64 noundef %103)
  br label %105

105:                                              ; preds = %99
  %106 = load i32, ptr %4, align 4, !tbaa !14
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %4, align 4, !tbaa !14
  br label %95, !llvm.loop !18

108:                                              ; preds = %98
  %109 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef 31, i64 noundef 15)
  %110 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef 15, i64 noundef 15)
  %111 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef 46, i64 noundef 15)
  %112 = call i64 @sc_map_get_64(ptr noundef %1, i64 noundef 19)
  %113 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %114 = load i8, ptr %113, align 2, !tbaa !5, !range !12, !noundef !13
  %115 = trunc i8 %114 to i1
  br i1 %115, label %117, label %116

116:                                              ; preds = %108
  br label %118

117:                                              ; preds = %108
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.14, i32 noundef 892, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !14
  br label %119

119:                                              ; preds = %132, %118
  %120 = load i32, ptr %5, align 4, !tbaa !14
  %121 = icmp slt i32 %120, 5
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %135

123:                                              ; preds = %119
  %124 = load i32, ptr %5, align 4, !tbaa !14
  %125 = mul nsw i32 5, %124
  %126 = load i32, ptr %5, align 4, !tbaa !14
  %127 = add nsw i32 %125, %126
  %128 = sext i32 %127 to i64
  %129 = load i32, ptr %5, align 4, !tbaa !14
  %130 = sext i32 %129 to i64
  %131 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %128, i64 noundef %130)
  br label %132

132:                                              ; preds = %123
  %133 = load i32, ptr %5, align 4, !tbaa !14
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %5, align 4, !tbaa !14
  br label %119, !llvm.loop !19

135:                                              ; preds = %122
  %136 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 4)
  %137 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %138 = load i8, ptr %137, align 2, !tbaa !5, !range !12, !noundef !13
  %139 = trunc i8 %138 to i1
  br i1 %139, label %140, label %141

140:                                              ; preds = %135
  br label %142

141:                                              ; preds = %135
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 899, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

142:                                              ; preds = %140
  %143 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 46)
  %144 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %145 = load i8, ptr %144, align 2, !tbaa !5, !range !12, !noundef !13
  %146 = trunc i8 %145 to i1
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  br label %149

148:                                              ; preds = %142
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 902, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

149:                                              ; preds = %147
  %150 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 15)
  %151 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %152 = load i8, ptr %151, align 2, !tbaa !5, !range !12, !noundef !13
  %153 = trunc i8 %152 to i1
  br i1 %153, label %154, label %155

154:                                              ; preds = %149
  br label %156

155:                                              ; preds = %149
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 905, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

156:                                              ; preds = %154
  call void @sc_map_clear_64(ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !14
  br label %157

157:                                              ; preds = %168, %156
  %158 = load i32, ptr %6, align 4, !tbaa !14
  %159 = icmp slt i32 %158, 4
  br i1 %159, label %161, label %160

160:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %171

161:                                              ; preds = %157
  %162 = load i32, ptr %6, align 4, !tbaa !14
  %163 = mul nsw i32 16, %162
  %164 = sext i32 %163 to i64
  %165 = load i32, ptr %6, align 4, !tbaa !14
  %166 = sext i32 %165 to i64
  %167 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %164, i64 noundef %166)
  br label %168

168:                                              ; preds = %161
  %169 = load i32, ptr %6, align 4, !tbaa !14
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %6, align 4, !tbaa !14
  br label %157, !llvm.loop !20

171:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !14
  br label %172

172:                                              ; preds = %183, %171
  %173 = load i32, ptr %7, align 4, !tbaa !14
  %174 = icmp slt i32 %173, 4
  br i1 %174, label %176, label %175

175:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %186

176:                                              ; preds = %172
  %177 = load i32, ptr %7, align 4, !tbaa !14
  %178 = mul nsw i32 1024, %177
  %179 = sext i32 %178 to i64
  %180 = load i32, ptr %7, align 4, !tbaa !14
  %181 = sext i32 %180 to i64
  %182 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %179, i64 noundef %181)
  br label %183

183:                                              ; preds = %176
  %184 = load i32, ptr %7, align 4, !tbaa !14
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %7, align 4, !tbaa !14
  br label %172, !llvm.loop !21

186:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !14
  br label %187

187:                                              ; preds = %198, %186
  %188 = load i32, ptr %8, align 4, !tbaa !14
  %189 = icmp slt i32 %188, 4
  br i1 %189, label %191, label %190

190:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %201

191:                                              ; preds = %187
  %192 = load i32, ptr %8, align 4, !tbaa !14
  %193 = mul nsw i32 512, %192
  %194 = sext i32 %193 to i64
  %195 = load i32, ptr %8, align 4, !tbaa !14
  %196 = sext i32 %195 to i64
  %197 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %194, i64 noundef %196)
  br label %198

198:                                              ; preds = %191
  %199 = load i32, ptr %8, align 4, !tbaa !14
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %8, align 4, !tbaa !14
  br label %187, !llvm.loop !22

201:                                              ; preds = %190
  %202 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 512)
  %203 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %204 = load i8, ptr %203, align 2, !tbaa !5, !range !12, !noundef !13
  %205 = trunc i8 %204 to i1
  br i1 %205, label %206, label %207

206:                                              ; preds = %201
  br label %208

207:                                              ; preds = %201
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 920, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

208:                                              ; preds = %206
  %209 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 1024)
  %210 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %211 = load i8, ptr %210, align 2, !tbaa !5, !range !12, !noundef !13
  %212 = trunc i8 %211 to i1
  br i1 %212, label %213, label %214

213:                                              ; preds = %208
  br label %215

214:                                              ; preds = %208
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 923, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

215:                                              ; preds = %213
  %216 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef 48)
  %217 = getelementptr inbounds %struct.sc_map_64, ptr %1, i32 0, i32 7
  %218 = load i8, ptr %217, align 2, !tbaa !5, !range !12, !noundef !13
  %219 = trunc i8 %218 to i1
  br i1 %219, label %220, label %221

220:                                              ; preds = %215
  br label %222

221:                                              ; preds = %215
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 926, ptr noundef @__PRETTY_FUNCTION__.test_64) #6
  unreachable

222:                                              ; preds = %220
  call void @sc_map_term_64(ptr noundef %1)
  %223 = call zeroext i1 @sc_map_init_64(ptr noundef %1, i32 noundef 2, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %224

224:                                              ; preds = %242, %222
  %225 = load i32, ptr %9, align 4, !tbaa !14
  %226 = icmp slt i32 %225, 1000000
  br i1 %226, label %228, label %227

227:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %245

228:                                              ; preds = %224
  %229 = call i32 @sc_map_size_64(ptr noundef %1)
  %230 = icmp ult i32 %229, 16
  br i1 %230, label %231, label %235

231:                                              ; preds = %228
  %232 = load i32, ptr %9, align 4, !tbaa !14
  %233 = sext i32 %232 to i64
  %234 = call i64 @sc_map_put_64(ptr noundef %1, i64 noundef %233, i64 noundef 1)
  br label %241

235:                                              ; preds = %228
  %236 = call i32 @rand() #5
  %237 = load i32, ptr %9, align 4, !tbaa !14
  %238 = srem i32 %236, %237
  %239 = sext i32 %238 to i64
  %240 = call i64 @sc_map_del_64(ptr noundef %1, i64 noundef %239)
  br label %241

241:                                              ; preds = %235, %231
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %9, align 4, !tbaa !14
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %9, align 4, !tbaa !14
  br label %224, !llvm.loop !23

245:                                              ; preds = %227
  call void @sc_map_term_64(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #5
  ret void
}

declare zeroext i1 @sc_map_init_64(ptr noundef, i32 noundef, i32 noundef) #4

declare void @sc_map_term_64(ptr noundef) #4

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

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

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

declare void @sc_map_clear_64(ptr noundef) #4

declare i32 @sc_map_size_64(ptr noundef) #4

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


; 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 }

@.str.14 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.test_64 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [30 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: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_64() local_unnamed_addr #3 {
  %1 = alloca %struct.sc_map_64, align 8
  tail call void @srand(i32 noundef 2132132131) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #5
  %2 = call zeroext i1 @sc_map_init_64(ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0) #5
  br i1 %2, label %4, label %3

3:                                                ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str.60, ptr noundef nonnull @.str.14, i32 noundef 853, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

4:                                                ; preds = %0
  call void @sc_map_term_64(ptr noundef nonnull %1) #5
  %5 = call zeroext i1 @sc_map_init_64(ptr noundef nonnull %1, i32 noundef 0, i32 noundef 1) #5
  br i1 %5, label %6, label %7

6:                                                ; preds = %4
  call void @__assert_fail(ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.14, i32 noundef 855, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

7:                                                ; preds = %4
  %8 = call zeroext i1 @sc_map_init_64(ptr noundef nonnull %1, i32 noundef 0, i32 noundef 99) #5
  br i1 %8, label %9, label %10

9:                                                ; preds = %7
  call void @__assert_fail(ptr noundef nonnull @.str.62, ptr noundef nonnull @.str.14, i32 noundef 856, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

10:                                               ; preds = %7
  %11 = call zeroext i1 @sc_map_init_64(ptr noundef nonnull %1, i32 noundef 16, i32 noundef 94) #5
  br i1 %11, label %13, label %12

12:                                               ; preds = %10
  call void @__assert_fail(ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.14, i32 noundef 858, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

13:                                               ; preds = %10
  %14 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 0) #5
  %15 = getelementptr inbounds i8, ptr %1, i64 26
  %16 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %18, label %19

18:                                               ; preds = %13
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.14, i32 noundef 861, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

19:                                               ; preds = %13
  %20 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 1) #5
  %21 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %22 = trunc nuw i8 %21 to i1
  br i1 %22, label %23, label %24

23:                                               ; preds = %19
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.14, i32 noundef 864, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

24:                                               ; preds = %19
  %25 = call i64 @sc_map_get_64(ptr noundef nonnull %1, i64 noundef 0) #5
  %26 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %28, label %29

28:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.14, i32 noundef 867, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

29:                                               ; preds = %24
  %30 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 0, i64 noundef 200) #5
  %31 = call i64 @sc_map_get_64(ptr noundef nonnull %1, i64 noundef 0) #5
  %32 = icmp eq i64 %31, 200
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @__assert_fail(ptr noundef nonnull @.str.64, ptr noundef nonnull @.str.14, i32 noundef 869, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

34:                                               ; preds = %29
  %35 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %.preheader42.preheader, label %51

.preheader42.preheader:                           ; preds = %34
  %37 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 0, i64 noundef 0) #5
  %38 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 1, i64 noundef 1) #5
  %39 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 2, i64 noundef 2) #5
  %40 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 3, i64 noundef 3) #5
  %41 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 4, i64 noundef 4) #5
  %42 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 5, i64 noundef 5) #5
  %43 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 6, i64 noundef 6) #5
  %44 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 7, i64 noundef 7) #5
  %45 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 8, i64 noundef 8) #5
  %46 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 9, i64 noundef 9) #5
  %47 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 10, i64 noundef 10) #5
  %48 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 11, i64 noundef 11) #5
  %49 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 12, i64 noundef 12) #5
  %50 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 13, i64 noundef 13) #5
  br label %.preheader41

51:                                               ; preds = %34
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 870, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

52:                                               ; preds = %.preheader41
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 200
  br i1 %exitcond.not, label %53, label %.preheader41, !llvm.loop !14

53:                                               ; preds = %52
  call void @sc_map_clear_64(ptr noundef nonnull %1) #5
  call void @sc_map_clear_64(ptr noundef nonnull %1) #5
  %54 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 0, i64 noundef 0) #5
  %55 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 1, i64 noundef 1) #5
  %56 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 2, i64 noundef 2) #5
  %57 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 3, i64 noundef 3) #5
  %58 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 4, i64 noundef 4) #5
  %59 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 31, i64 noundef 15) #5
  %60 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 15, i64 noundef 15) #5
  %61 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 46, i64 noundef 15) #5
  %62 = call i64 @sc_map_get_64(ptr noundef nonnull %1, i64 noundef 19) #5
  %63 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %77, label %.preheader40.preheader

.preheader41:                                     ; preds = %.preheader42.preheader, %52
  %indvars.iv = phi i64 [ 100, %.preheader42.preheader ], [ %indvars.iv.next, %52 ]
  %65 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef %indvars.iv) #5
  %66 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %68, label %52

68:                                               ; preds = %.preheader41
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.14, i32 noundef 878, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

.preheader40.preheader:                           ; preds = %53
  %69 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 0, i64 noundef 0) #5
  %70 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 6, i64 noundef 1) #5
  %71 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 12, i64 noundef 2) #5
  %72 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 18, i64 noundef 3) #5
  %73 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 24, i64 noundef 4) #5
  %74 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 4) #5
  %75 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %76 = trunc nuw i8 %75 to i1
  br i1 %76, label %79, label %78

77:                                               ; preds = %53
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.14, i32 noundef 892, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

78:                                               ; preds = %.preheader40.preheader
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 899, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

79:                                               ; preds = %.preheader40.preheader
  %80 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 46) #5
  %81 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %82 = trunc nuw i8 %81 to i1
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 902, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

84:                                               ; preds = %79
  %85 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 15) #5
  %86 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %87 = trunc nuw i8 %86 to i1
  br i1 %87, label %.preheader39.preheader, label %88

88:                                               ; preds = %84
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 905, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

.preheader39.preheader:                           ; preds = %84
  call void @sc_map_clear_64(ptr noundef nonnull %1) #5
  %89 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 16, i64 noundef 1) #5
  %90 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 32, i64 noundef 2) #5
  %91 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 48, i64 noundef 3) #5
  %92 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 1024, i64 noundef 1) #5
  %93 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 2048, i64 noundef 2) #5
  %94 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 3072, i64 noundef 3) #5
  %95 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 512, i64 noundef 1) #5
  %96 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 1024, i64 noundef 2) #5
  %97 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef 1536, i64 noundef 3) #5
  %98 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 512) #5
  %99 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %100 = trunc nuw i8 %99 to i1
  br i1 %100, label %102, label %101

101:                                              ; preds = %.preheader39.preheader
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 920, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

102:                                              ; preds = %.preheader39.preheader
  %103 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 1024) #5
  %104 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %105 = trunc nuw i8 %104 to i1
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 923, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

107:                                              ; preds = %102
  %108 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef 48) #5
  %109 = load i8, ptr %15, align 2, !tbaa !5, !range !12, !noundef !13
  %110 = trunc nuw i8 %109 to i1
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 926, ptr noundef nonnull @__PRETTY_FUNCTION__.test_64) #6
  unreachable

112:                                              ; preds = %107
  call void @sc_map_term_64(ptr noundef nonnull %1) #5
  %113 = call zeroext i1 @sc_map_init_64(ptr noundef nonnull %1, i32 noundef 2, i32 noundef 0) #5
  br label %115

114:                                              ; preds = %126
  call void @sc_map_term_64(ptr noundef nonnull %1) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #5
  ret void

115:                                              ; preds = %112, %126
  %indvars.iv73 = phi i64 [ 0, %112 ], [ %indvars.iv.next74, %126 ]
  %116 = call i32 @sc_map_size_64(ptr noundef nonnull %1) #5
  %117 = icmp ult i32 %116, 16
  br i1 %117, label %118, label %120

118:                                              ; preds = %115
  %119 = call i64 @sc_map_put_64(ptr noundef nonnull %1, i64 noundef %indvars.iv73, i64 noundef 1) #5
  br label %126

120:                                              ; preds = %115
  %121 = call i32 @rand() #5
  %122 = trunc nuw nsw i64 %indvars.iv73 to i32
  %123 = srem i32 %121, %122
  %124 = sext i32 %123 to i64
  %125 = call i64 @sc_map_del_64(ptr noundef nonnull %1, i64 noundef %124) #5
  br label %126

126:                                              ; preds = %118, %120
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next74, 1000000
  br i1 %exitcond76.not, label %114, label %115, !llvm.loop !16
}

declare zeroext i1 @sc_map_init_64(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

declare void @sc_map_term_64(ptr noundef) local_unnamed_addr #4

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

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

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

declare void @sc_map_clear_64(ptr noundef) local_unnamed_addr #4

declare i32 @sc_map_size_64(ptr noundef) local_unnamed_addr #4

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass