; LLVM IR from seppo0010/rlite :: tests (sort-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.greatest_run_info = type { i32, i32, i32, i32, i32, i32, %struct.greatest_suite_info, ptr, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i64, i64, [1 x %struct.__jmp_buf_tag] }
%struct.greatest_suite_info = type { i32, i32, i32, i32, i64, i64, i64, i64 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@greatest_info = external global %struct.greatest_run_info, align 8
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @sort_test() #0 {
  %1 = alloca i32, align 4
  %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
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %253, %0
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 3
  br i1 %17, label %18, label %256

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  %20 = call i32 @greatest_pre_test(ptr noundef @.str)
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %22, label %26

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = call i32 @sort_nosort_list_test(i32 noundef %23)
  store i32 %24, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str, i32 noundef %25)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %34

26:                                               ; preds = %19
  %27 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %28 = and i32 %27, 4
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = load ptr, ptr @stdout, align 8, !tbaa !14
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.1, ptr noundef @.str) #4
  br label %33

33:                                               ; preds = %30, %26
  br label %34

34:                                               ; preds = %33, %22
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  %38 = call i32 @greatest_pre_test(ptr noundef @.str.2)
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %40, label %44

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %41 = load i32, ptr %1, align 4, !tbaa !5
  %42 = call i32 @sort_list_test(i32 noundef %41)
  store i32 %42, ptr %3, align 4, !tbaa !5
  %43 = load i32, ptr %3, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.2, i32 noundef %43)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %52

44:                                               ; preds = %37
  %45 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %46 = and i32 %45, 4
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %51

48:                                               ; preds = %44
  %49 = load ptr, ptr @stdout, align 8, !tbaa !14
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.1, ptr noundef @.str.2) #4
  br label %51

51:                                               ; preds = %48, %44
  br label %52

52:                                               ; preds = %51, %40
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  %56 = call i32 @greatest_pre_test(ptr noundef @.str.3)
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %58, label %62

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = call i32 @sort_list_sortby_test(i32 noundef %59)
  store i32 %60, ptr %4, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.3, i32 noundef %61)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %70

62:                                               ; preds = %55
  %63 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %64 = and i32 %63, 4
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %62
  %67 = load ptr, ptr @stdout, align 8, !tbaa !14
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.1, ptr noundef @.str.3) #4
  br label %69

69:                                               ; preds = %66, %62
  br label %70

70:                                               ; preds = %69, %58
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  %74 = call i32 @greatest_pre_test(ptr noundef @.str.4)
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %80

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %77 = load i32, ptr %1, align 4, !tbaa !5
  %78 = call i32 @sort_list_sortby_alpha_test(i32 noundef %77)
  store i32 %78, ptr %5, align 4, !tbaa !5
  %79 = load i32, ptr %5, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.4, i32 noundef %79)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %88

80:                                               ; preds = %73
  %81 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %82 = and i32 %81, 4
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %87

84:                                               ; preds = %80
  %85 = load ptr, ptr @stdout, align 8, !tbaa !14
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.1, ptr noundef @.str.4) #4
  br label %87

87:                                               ; preds = %84, %80
  br label %88

88:                                               ; preds = %87, %76
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = call i32 @greatest_pre_test(ptr noundef @.str.5)
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %94, label %98

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %95 = load i32, ptr %1, align 4, !tbaa !5
  %96 = call i32 @sort_nosort_set_test(i32 noundef %95)
  store i32 %96, ptr %6, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.5, i32 noundef %97)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %106

98:                                               ; preds = %91
  %99 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %100 = and i32 %99, 4
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %105

102:                                              ; preds = %98
  %103 = load ptr, ptr @stdout, align 8, !tbaa !14
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.1, ptr noundef @.str.5) #4
  br label %105

105:                                              ; preds = %102, %98
  br label %106

106:                                              ; preds = %105, %94
  br label %107

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108
  %110 = call i32 @greatest_pre_test(ptr noundef @.str.6)
  %111 = icmp eq i32 %110, 1
  br i1 %111, label %112, label %116

112:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = call i32 @sort_set_test(i32 noundef %113)
  store i32 %114, ptr %7, align 4, !tbaa !5
  %115 = load i32, ptr %7, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.6, i32 noundef %115)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %124

116:                                              ; preds = %109
  %117 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %118 = and i32 %117, 4
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %123

120:                                              ; preds = %116
  %121 = load ptr, ptr @stdout, align 8, !tbaa !14
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.1, ptr noundef @.str.6) #4
  br label %123

123:                                              ; preds = %120, %116
  br label %124

124:                                              ; preds = %123, %112
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  %128 = call i32 @greatest_pre_test(ptr noundef @.str.7)
  %129 = icmp eq i32 %128, 1
  br i1 %129, label %130, label %134

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %131 = load i32, ptr %1, align 4, !tbaa !5
  %132 = call i32 @sort_set_sortby_test(i32 noundef %131)
  store i32 %132, ptr %8, align 4, !tbaa !5
  %133 = load i32, ptr %8, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.7, i32 noundef %133)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %142

134:                                              ; preds = %127
  %135 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %136 = and i32 %135, 4
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %141

138:                                              ; preds = %134
  %139 = load ptr, ptr @stdout, align 8, !tbaa !14
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.1, ptr noundef @.str.7) #4
  br label %141

141:                                              ; preds = %138, %134
  br label %142

142:                                              ; preds = %141, %130
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = call i32 @greatest_pre_test(ptr noundef @.str.8)
  %147 = icmp eq i32 %146, 1
  br i1 %147, label %148, label %152

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %149 = load i32, ptr %1, align 4, !tbaa !5
  %150 = call i32 @sort_set_sortby_alpha_test(i32 noundef %149)
  store i32 %150, ptr %9, align 4, !tbaa !5
  %151 = load i32, ptr %9, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.8, i32 noundef %151)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %160

152:                                              ; preds = %145
  %153 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %154 = and i32 %153, 4
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %159

156:                                              ; preds = %152
  %157 = load ptr, ptr @stdout, align 8, !tbaa !14
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.1, ptr noundef @.str.8) #4
  br label %159

159:                                              ; preds = %156, %152
  br label %160

160:                                              ; preds = %159, %148
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  %164 = call i32 @greatest_pre_test(ptr noundef @.str.9)
  %165 = icmp eq i32 %164, 1
  br i1 %165, label %166, label %170

166:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %167 = load i32, ptr %1, align 4, !tbaa !5
  %168 = call i32 @sort_nosort_zset_test(i32 noundef %167)
  store i32 %168, ptr %10, align 4, !tbaa !5
  %169 = load i32, ptr %10, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.9, i32 noundef %169)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %178

170:                                              ; preds = %163
  %171 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %172 = and i32 %171, 4
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %177

174:                                              ; preds = %170
  %175 = load ptr, ptr @stdout, align 8, !tbaa !14
  %176 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef @.str.1, ptr noundef @.str.9) #4
  br label %177

177:                                              ; preds = %174, %170
  br label %178

178:                                              ; preds = %177, %166
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  %182 = call i32 @greatest_pre_test(ptr noundef @.str.10)
  %183 = icmp eq i32 %182, 1
  br i1 %183, label %184, label %188

184:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %185 = load i32, ptr %1, align 4, !tbaa !5
  %186 = call i32 @sort_zset_test(i32 noundef %185)
  store i32 %186, ptr %11, align 4, !tbaa !5
  %187 = load i32, ptr %11, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.10, i32 noundef %187)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %196

188:                                              ; preds = %181
  %189 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %190 = and i32 %189, 4
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %195

192:                                              ; preds = %188
  %193 = load ptr, ptr @stdout, align 8, !tbaa !14
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.1, ptr noundef @.str.10) #4
  br label %195

195:                                              ; preds = %192, %188
  br label %196

196:                                              ; preds = %195, %184
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198
  %200 = call i32 @greatest_pre_test(ptr noundef @.str.11)
  %201 = icmp eq i32 %200, 1
  br i1 %201, label %202, label %206

202:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %203 = load i32, ptr %1, align 4, !tbaa !5
  %204 = call i32 @sort_zset_sortby_test(i32 noundef %203)
  store i32 %204, ptr %12, align 4, !tbaa !5
  %205 = load i32, ptr %12, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.11, i32 noundef %205)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %214

206:                                              ; preds = %199
  %207 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %208 = and i32 %207, 4
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %213

210:                                              ; preds = %206
  %211 = load ptr, ptr @stdout, align 8, !tbaa !14
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef @.str.1, ptr noundef @.str.11) #4
  br label %213

213:                                              ; preds = %210, %206
  br label %214

214:                                              ; preds = %213, %202
  br label %215

215:                                              ; preds = %214
  br label %216

216:                                              ; preds = %215
  br label %217

217:                                              ; preds = %216
  %218 = call i32 @greatest_pre_test(ptr noundef @.str.12)
  %219 = icmp eq i32 %218, 1
  br i1 %219, label %220, label %224

220:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %221 = load i32, ptr %1, align 4, !tbaa !5
  %222 = call i32 @sort_zset_sortby_alpha_test(i32 noundef %221)
  store i32 %222, ptr %13, align 4, !tbaa !5
  %223 = load i32, ptr %13, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.12, i32 noundef %223)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %232

224:                                              ; preds = %217
  %225 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %226 = and i32 %225, 4
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %228, label %231

228:                                              ; preds = %224
  %229 = load ptr, ptr @stdout, align 8, !tbaa !14
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef @.str.1, ptr noundef @.str.12) #4
  br label %231

231:                                              ; preds = %228, %224
  br label %232

232:                                              ; preds = %231, %220
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234
  %236 = call i32 @greatest_pre_test(ptr noundef @.str.13)
  %237 = icmp eq i32 %236, 1
  br i1 %237, label %238, label %242

238:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %239 = load i32, ptr %1, align 4, !tbaa !5
  %240 = call i32 @sort_set_nosort_lua(i32 noundef %239)
  store i32 %240, ptr %14, align 4, !tbaa !5
  %241 = load i32, ptr %14, align 4, !tbaa !5
  call void @greatest_post_test(ptr noundef @.str.13, i32 noundef %241)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %250

242:                                              ; preds = %235
  %243 = load i32, ptr @greatest_info, align 8, !tbaa !9
  %244 = and i32 %243, 4
  %245 = icmp ne i32 %244, 0
  br i1 %245, label %246, label %249

246:                                              ; preds = %242
  %247 = load ptr, ptr @stdout, align 8, !tbaa !14
  %248 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %247, ptr noundef @.str.1, ptr noundef @.str.13) #4
  br label %249

249:                                              ; preds = %246, %242
  br label %250

250:                                              ; preds = %249, %238
  br label %251

251:                                              ; preds = %250
  br label %252

252:                                              ; preds = %251
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %1, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %1, align 4, !tbaa !5
  br label %15, !llvm.loop !15

256:                                              ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

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

declare i32 @greatest_pre_test(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_nosort_list_test(i32 noundef) #0

declare void @greatest_post_test(ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_list_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_list_sortby_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_list_sortby_alpha_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_nosort_set_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_sortby_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_sortby_alpha_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_nosort_zset_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_zset_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_zset_sortby_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_zset_sortby_alpha_test(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_nosort_lua(i32 noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 "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 }

!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, !6, i64 0}
!10 = !{!"greatest_run_info", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !13, i64 72, !6, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !6, i64 128, !6, i64 132, !13, i64 136, !13, i64 144, !12, i64 152, !12, i64 160, !7, i64 168}
!11 = !{!"greatest_suite_info", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!12 = !{!"long", !7, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

%struct.greatest_run_info = type { i32, i32, i32, i32, i32, i32, %struct.greatest_suite_info, ptr, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i64, i64, [1 x %struct.__jmp_buf_tag] }
%struct.greatest_suite_info = type { i32, i32, i32, i32, i64, i64, i64, i64 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@greatest_info = external local_unnamed_addr global %struct.greatest_run_info, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @sort_test() local_unnamed_addr #0 {
  br label %1

1:                                                ; preds = %0, %144
  %.040 = phi i32 [ 0, %0 ], [ %145, %144 ]
  %2 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str) #3
  %3 = icmp eq i32 %2, 1
  br i1 %3, label %4, label %6

4:                                                ; preds = %1
  %5 = tail call i32 @sort_nosort_list_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str, i32 noundef %5) #3
  br label %12

6:                                                ; preds = %1
  %7 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %8 = and i32 %7, 4
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %12, label %9

9:                                                ; preds = %6
  %10 = load ptr, ptr @stdout, align 8, !tbaa !13
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str) #3
  br label %12

12:                                               ; preds = %4, %9, %6
  %13 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.2) #3
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %15, label %17

15:                                               ; preds = %12
  %16 = tail call i32 @sort_list_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.2, i32 noundef %16) #3
  br label %23

17:                                               ; preds = %12
  %18 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %19 = and i32 %18, 4
  %.not28 = icmp eq i32 %19, 0
  br i1 %.not28, label %23, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr @stdout, align 8, !tbaa !13
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2) #3
  br label %23

23:                                               ; preds = %15, %20, %17
  %24 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.3) #3
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = tail call i32 @sort_list_sortby_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.3, i32 noundef %27) #3
  br label %34

28:                                               ; preds = %23
  %29 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %30 = and i32 %29, 4
  %.not29 = icmp eq i32 %30, 0
  br i1 %.not29, label %34, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr @stdout, align 8, !tbaa !13
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #3
  br label %34

34:                                               ; preds = %26, %31, %28
  %35 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.4) #3
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  %38 = tail call i32 @sort_list_sortby_alpha_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.4, i32 noundef %38) #3
  br label %45

39:                                               ; preds = %34
  %40 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %41 = and i32 %40, 4
  %.not30 = icmp eq i32 %41, 0
  br i1 %.not30, label %45, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr @stdout, align 8, !tbaa !13
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #3
  br label %45

45:                                               ; preds = %37, %42, %39
  %46 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.5) #3
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %48, label %50

48:                                               ; preds = %45
  %49 = tail call i32 @sort_nosort_set_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.5, i32 noundef %49) #3
  br label %56

50:                                               ; preds = %45
  %51 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %52 = and i32 %51, 4
  %.not31 = icmp eq i32 %52, 0
  br i1 %.not31, label %56, label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr @stdout, align 8, !tbaa !13
  %55 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.5) #3
  br label %56

56:                                               ; preds = %48, %53, %50
  %57 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.6) #3
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = tail call i32 @sort_set_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.6, i32 noundef %60) #3
  br label %67

61:                                               ; preds = %56
  %62 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %63 = and i32 %62, 4
  %.not32 = icmp eq i32 %63, 0
  br i1 %.not32, label %67, label %64

64:                                               ; preds = %61
  %65 = load ptr, ptr @stdout, align 8, !tbaa !13
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.6) #3
  br label %67

67:                                               ; preds = %59, %64, %61
  %68 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.7) #3
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %72

70:                                               ; preds = %67
  %71 = tail call i32 @sort_set_sortby_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.7, i32 noundef %71) #3
  br label %78

72:                                               ; preds = %67
  %73 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %74 = and i32 %73, 4
  %.not33 = icmp eq i32 %74, 0
  br i1 %.not33, label %78, label %75

75:                                               ; preds = %72
  %76 = load ptr, ptr @stdout, align 8, !tbaa !13
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.7) #3
  br label %78

78:                                               ; preds = %70, %75, %72
  %79 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.8) #3
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = tail call i32 @sort_set_sortby_alpha_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.8, i32 noundef %82) #3
  br label %89

83:                                               ; preds = %78
  %84 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %85 = and i32 %84, 4
  %.not34 = icmp eq i32 %85, 0
  br i1 %.not34, label %89, label %86

86:                                               ; preds = %83
  %87 = load ptr, ptr @stdout, align 8, !tbaa !13
  %88 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.8) #3
  br label %89

89:                                               ; preds = %81, %86, %83
  %90 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.9) #3
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %94

92:                                               ; preds = %89
  %93 = tail call i32 @sort_nosort_zset_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.9, i32 noundef %93) #3
  br label %100

94:                                               ; preds = %89
  %95 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %96 = and i32 %95, 4
  %.not35 = icmp eq i32 %96, 0
  br i1 %.not35, label %100, label %97

97:                                               ; preds = %94
  %98 = load ptr, ptr @stdout, align 8, !tbaa !13
  %99 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.9) #3
  br label %100

100:                                              ; preds = %92, %97, %94
  %101 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.10) #3
  %102 = icmp eq i32 %101, 1
  br i1 %102, label %103, label %105

103:                                              ; preds = %100
  %104 = tail call i32 @sort_zset_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.10, i32 noundef %104) #3
  br label %111

105:                                              ; preds = %100
  %106 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %107 = and i32 %106, 4
  %.not36 = icmp eq i32 %107, 0
  br i1 %.not36, label %111, label %108

108:                                              ; preds = %105
  %109 = load ptr, ptr @stdout, align 8, !tbaa !13
  %110 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.10) #3
  br label %111

111:                                              ; preds = %103, %108, %105
  %112 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.11) #3
  %113 = icmp eq i32 %112, 1
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  %115 = tail call i32 @sort_zset_sortby_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.11, i32 noundef %115) #3
  br label %122

116:                                              ; preds = %111
  %117 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %118 = and i32 %117, 4
  %.not37 = icmp eq i32 %118, 0
  br i1 %.not37, label %122, label %119

119:                                              ; preds = %116
  %120 = load ptr, ptr @stdout, align 8, !tbaa !13
  %121 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.11) #3
  br label %122

122:                                              ; preds = %114, %119, %116
  %123 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.12) #3
  %124 = icmp eq i32 %123, 1
  br i1 %124, label %125, label %127

125:                                              ; preds = %122
  %126 = tail call i32 @sort_zset_sortby_alpha_test(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.12, i32 noundef %126) #3
  br label %133

127:                                              ; preds = %122
  %128 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %129 = and i32 %128, 4
  %.not38 = icmp eq i32 %129, 0
  br i1 %.not38, label %133, label %130

130:                                              ; preds = %127
  %131 = load ptr, ptr @stdout, align 8, !tbaa !13
  %132 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.12) #3
  br label %133

133:                                              ; preds = %125, %130, %127
  %134 = tail call i32 @greatest_pre_test(ptr noundef nonnull @.str.13) #3
  %135 = icmp eq i32 %134, 1
  br i1 %135, label %136, label %138

136:                                              ; preds = %133
  %137 = tail call i32 @sort_set_nosort_lua(i32 noundef %.040)
  tail call void @greatest_post_test(ptr noundef nonnull @.str.13, i32 noundef %137) #3
  br label %144

138:                                              ; preds = %133
  %139 = load i32, ptr @greatest_info, align 8, !tbaa !5
  %140 = and i32 %139, 4
  %.not39 = icmp eq i32 %140, 0
  br i1 %.not39, label %144, label %141

141:                                              ; preds = %138
  %142 = load ptr, ptr @stdout, align 8, !tbaa !13
  %143 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.13) #3
  br label %144

144:                                              ; preds = %136, %141, %138
  %145 = add nuw nsw i32 %.040, 1
  %exitcond.not = icmp eq i32 %145, 3
  br i1 %exitcond.not, label %146, label %1, !llvm.loop !14

146:                                              ; preds = %144
  ret void
}

declare i32 @greatest_pre_test(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_nosort_list_test(i32 noundef) local_unnamed_addr #0

declare void @greatest_post_test(ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_list_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_list_sortby_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_list_sortby_alpha_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_nosort_set_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_sortby_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_sortby_alpha_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_nosort_zset_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_zset_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_zset_sortby_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_zset_sortby_alpha_test(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @sort_set_nosort_lua(i32 noundef) local_unnamed_addr #0

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"greatest_run_info", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !12, i64 72, !7, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !7, i64 128, !7, i64 132, !12, i64 136, !12, i64 144, !11, i64 152, !11, i64 160, !8, i64 168}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"greatest_suite_info", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!12, !12, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass