; LLVM IR from recp/ds :: test/src (test_flist_sep)

; 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.test_status_t = type { ptr, i32 }
%struct.FListItem = type { ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_flist_sep() #0 {
  %1 = alloca %struct.test_status_t, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 200, ptr %4, align 4, !tbaa !5
  store ptr null, ptr %2, align 8, !tbaa !9
  %15 = call i64 @time(ptr noundef null) #5
  %16 = trunc i64 %15 to i32
  call void @srand(i32 noundef %16) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %209, %0
  %18 = load i32, ptr %5, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %21, label %212

21:                                               ; preds = %17
  %22 = call noalias ptr @malloc(i64 noundef 4) #6
  store ptr %22, ptr %3, align 8, !tbaa !9
  %23 = call double @drand48() #5
  %24 = fptrunc double %23 to float
  %25 = load ptr, ptr %3, align 8, !tbaa !9
  store float %24, ptr %25, align 4, !tbaa !11
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = srem i32 %26, 2
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %42

29:                                               ; preds = %21
  %30 = load ptr, ptr %3, align 8, !tbaa !9
  call void @flist_sp_insert(ptr noundef %2, ptr noundef %30)
  br label %31

31:                                               ; preds = %29
  %32 = load ptr, ptr %2, align 8, !tbaa !9
  %33 = icmp ne ptr %32, null
  br i1 %33, label %39, label %34

34:                                               ; preds = %31
  %35 = load ptr, ptr @stderr, align 8, !tbaa !9
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 27, ptr noundef @.str.2) #5
  %37 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %37, align 8, !tbaa !13
  %38 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %38, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %215

39:                                               ; preds = %31
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  br label %55

42:                                               ; preds = %21
  %43 = load ptr, ptr %3, align 8, !tbaa !9
  call void @flist_sp_append(ptr noundef %2, ptr noundef %43)
  br label %44

44:                                               ; preds = %42
  %45 = load ptr, ptr %2, align 8, !tbaa !9
  %46 = icmp ne ptr %45, null
  br i1 %46, label %52, label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 33, ptr noundef @.str.2) #5
  %50 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %51, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %215

52:                                               ; preds = %44
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54, %41
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %3, align 8, !tbaa !9
  %58 = call zeroext i1 @flist_sp_contains(ptr noundef %2, ptr noundef %57)
  br i1 %58, label %64, label %59

59:                                               ; preds = %56
  %60 = load ptr, ptr @stderr, align 8, !tbaa !9
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 37, ptr noundef @.str.3) #5
  %62 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %62, align 8, !tbaa !13
  %63 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %63, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %215

64:                                               ; preds = %56
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %82

69:                                               ; preds = %66
  %70 = load ptr, ptr %3, align 8, !tbaa !9
  call void @flist_sp_remove_by(ptr noundef %2, ptr noundef %70)
  br label %71

71:                                               ; preds = %69
  %72 = load ptr, ptr %3, align 8, !tbaa !9
  %73 = call zeroext i1 @flist_sp_contains(ptr noundef %2, ptr noundef %72)
  br i1 %73, label %74, label %79

74:                                               ; preds = %71
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 42, ptr noundef @.str.4) #5
  %77 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %77, align 8, !tbaa !13
  %78 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %78, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %215

79:                                               ; preds = %71
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81, %66
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = icmp eq i32 %83, 10
  br i1 %84, label %85, label %117

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  br label %86

86:                                               ; preds = %85
  %87 = call ptr @flist_sp_last(ptr noundef %2)
  %88 = call ptr @flist_sp_at(ptr noundef %2, i32 noundef 9)
  %89 = icmp eq ptr %87, %88
  br i1 %89, label %95, label %90

90:                                               ; preds = %86
  %91 = load ptr, ptr @stderr, align 8, !tbaa !9
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 50, ptr noundef @.str.5) #5
  %93 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %93, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %94, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %114

95:                                               ; preds = %86
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %2, align 8, !tbaa !9
  store ptr %98, ptr %7, align 8, !tbaa !9
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.FListItem, ptr %99, i32 0, i32 1
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  store ptr %101, ptr %8, align 8, !tbaa !9
  %102 = load ptr, ptr %7, align 8, !tbaa !9
  call void @flist_sp_remove(ptr noundef %2, ptr noundef %102)
  br label %103

103:                                              ; preds = %97
  %104 = load ptr, ptr %8, align 8, !tbaa !9
  %105 = call zeroext i1 @flist_sp_contains(ptr noundef %2, ptr noundef %104)
  br i1 %105, label %106, label %111

106:                                              ; preds = %103
  %107 = load ptr, ptr @stderr, align 8, !tbaa !9
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 55, ptr noundef @.str.6) #5
  %109 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %109, align 8, !tbaa !13
  %110 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %110, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %114

111:                                              ; preds = %103
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  store i32 0, ptr %6, align 4
  br label %114

114:                                              ; preds = %113, %106, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %115 = load i32, ptr %6, align 4
  switch i32 %115, label %215 [
    i32 0, label %116
  ]

116:                                              ; preds = %114
  br label %117

117:                                              ; preds = %116, %82
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = icmp eq i32 %118, 30
  br i1 %119, label %120, label %139

120:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %121 = load ptr, ptr %2, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.FListItem, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !16
  store ptr %123, ptr %9, align 8, !tbaa !9
  %124 = load ptr, ptr %9, align 8, !tbaa !9
  call void @flist_sp_remove_by(ptr noundef %2, ptr noundef %124)
  br label %125

125:                                              ; preds = %120
  %126 = load ptr, ptr %9, align 8, !tbaa !9
  %127 = call zeroext i1 @flist_sp_contains(ptr noundef %2, ptr noundef %126)
  br i1 %127, label %128, label %133

128:                                              ; preds = %125
  %129 = load ptr, ptr @stderr, align 8, !tbaa !9
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 62, ptr noundef @.str.6) #5
  %131 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %131, align 8, !tbaa !13
  %132 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %132, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %136

133:                                              ; preds = %125
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  store i32 0, ptr %6, align 4
  br label %136

136:                                              ; preds = %135, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %137 = load i32, ptr %6, align 4
  switch i32 %137, label %215 [
    i32 0, label %138
  ]

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138, %117
  %140 = load i32, ptr %5, align 4, !tbaa !5
  %141 = icmp eq i32 %140, 40
  br i1 %141, label %142, label %193

142:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %143 = load ptr, ptr %2, align 8, !tbaa !9
  store ptr %143, ptr %10, align 8, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %151, %142
  %145 = load i32, ptr %14, align 4, !tbaa !5
  %146 = icmp slt i32 %145, 5
  br i1 %146, label %147, label %154

147:                                              ; preds = %144
  %148 = load ptr, ptr %10, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct.FListItem, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !18
  store ptr %150, ptr %10, align 8, !tbaa !9
  br label %151

151:                                              ; preds = %147
  %152 = load i32, ptr %14, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %14, align 4, !tbaa !5
  br label %144, !llvm.loop !19

154:                                              ; preds = %144
  %155 = load ptr, ptr %10, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct.FListItem, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !18
  %158 = getelementptr inbounds %struct.FListItem, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !18
  store ptr %159, ptr %11, align 8, !tbaa !9
  %160 = load ptr, ptr %10, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.FListItem, ptr %160, i32 0, i32 1
  %162 = load ptr, ptr %161, align 8, !tbaa !16
  store ptr %162, ptr %12, align 8, !tbaa !9
  %163 = load ptr, ptr %11, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.FListItem, ptr %163, i32 0, i32 1
  %165 = load ptr, ptr %164, align 8, !tbaa !16
  store ptr %165, ptr %13, align 8, !tbaa !9
  %166 = load ptr, ptr %10, align 8, !tbaa !9
  call void @flist_sp_remove(ptr noundef %2, ptr noundef %166)
  %167 = load ptr, ptr %11, align 8, !tbaa !9
  call void @flist_sp_remove(ptr noundef %2, ptr noundef %167)
  br label %168

168:                                              ; preds = %154
  %169 = load ptr, ptr %12, align 8, !tbaa !9
  %170 = call zeroext i1 @flist_sp_contains(ptr noundef %2, ptr noundef %169)
  br i1 %170, label %171, label %176

171:                                              ; preds = %168
  %172 = load ptr, ptr @stderr, align 8, !tbaa !9
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 83, ptr noundef @.str.7) #5
  %174 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %174, align 8, !tbaa !13
  %175 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %175, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %190

176:                                              ; preds = %168
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %13, align 8, !tbaa !9
  %181 = call zeroext i1 @flist_sp_contains(ptr noundef %2, ptr noundef %180)
  br i1 %181, label %182, label %187

182:                                              ; preds = %179
  %183 = load ptr, ptr @stderr, align 8, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 84, ptr noundef @.str.8) #5
  %185 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %185, align 8, !tbaa !13
  %186 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %186, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %190

187:                                              ; preds = %179
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  store i32 0, ptr %6, align 4
  br label %190

190:                                              ; preds = %189, %182, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %191 = load i32, ptr %6, align 4
  switch i32 %191, label %215 [
    i32 0, label %192
  ]

192:                                              ; preds = %190
  br label %193

193:                                              ; preds = %192, %139
  %194 = load i32, ptr %5, align 4, !tbaa !5
  %195 = icmp eq i32 %194, 100
  br i1 %195, label %196, label %208

196:                                              ; preds = %193
  call void @flist_sp_destroy(ptr noundef %2)
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %2, align 8, !tbaa !9
  %199 = icmp ne ptr %198, null
  br i1 %199, label %200, label %205

200:                                              ; preds = %197
  %201 = load ptr, ptr @stderr, align 8, !tbaa !9
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 90, ptr noundef @.str.9) #5
  %203 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %203, align 8, !tbaa !13
  %204 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %204, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %215

205:                                              ; preds = %197
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207, %193
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %5, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %5, align 4, !tbaa !5
  br label %17, !llvm.loop !21

212:                                              ; preds = %17
  call void @flist_sp_destroy(ptr noundef %2)
  %213 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %213, align 8, !tbaa !13
  %214 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 1, ptr %214, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  br label %215

215:                                              ; preds = %212, %200, %190, %136, %114, %74, %59, %47, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %216 = load { ptr, i32 }, ptr %1, align 8
  ret { ptr, i32 } %216
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nounwind
declare double @drand48() #2

declare void @flist_sp_insert(ptr noundef, ptr noundef) #4

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

declare void @flist_sp_append(ptr noundef, ptr noundef) #4

declare zeroext i1 @flist_sp_contains(ptr noundef, ptr noundef) #4

declare void @flist_sp_remove_by(ptr noundef, ptr noundef) #4

declare ptr @flist_sp_last(ptr noundef) #4

declare ptr @flist_sp_at(ptr noundef, i32 noundef) #4

declare void @flist_sp_remove(ptr noundef, ptr noundef) #4

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

declare void @flist_sp_destroy(ptr noundef) #4

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 = { 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 allocsize(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 = { nounwind allocsize(0) }

!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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"test_status_t", !10, i64 0, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = !{!17, !10, i64 8}
!17 = !{!"FListItem", !10, i64 0, !10, i64 8}
!18 = !{!17, !10, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_flist_sep() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store ptr null, ptr %1, align 8, !tbaa !5
  %2 = tail call i64 @time(ptr noundef null) #6
  %3 = trunc i64 %2 to i32
  tail call void @srand(i32 noundef %3) #6
  br label %4

4:                                                ; preds = %0, %.critedge40
  %.03443 = phi i32 [ 0, %0 ], [ %76, %.critedge40 ]
  %5 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %6 = call double @drand48() #6
  %7 = fptrunc double %6 to float
  store float %7, ptr %5, align 4, !tbaa !9
  %8 = and i32 %.03443, 1
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %15

10:                                               ; preds = %4
  call void @flist_sp_insert(ptr noundef nonnull %1, ptr noundef nonnull %5) #6
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %.not37 = icmp eq ptr %11, null
  br i1 %.not37, label %12, label %20

12:                                               ; preds = %10
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 27, ptr noundef nonnull @.str.2) #8
  br label %.critedge

15:                                               ; preds = %4
  call void @flist_sp_append(ptr noundef nonnull %1, ptr noundef nonnull %5) #6
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %17, label %20

17:                                               ; preds = %15
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 33, ptr noundef nonnull @.str.2) #8
  br label %.critedge

20:                                               ; preds = %10, %15
  %21 = call zeroext i1 @flist_sp_contains(ptr noundef nonnull %1, ptr noundef nonnull %5) #6
  br i1 %21, label %25, label %22

22:                                               ; preds = %20
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 37, ptr noundef nonnull @.str.3) #8
  br label %.critedge

25:                                               ; preds = %20
  %trunc = trunc nuw i32 %.03443 to i8
  switch i8 %trunc, label %.critedge40 [
    i8 0, label %33
    i8 10, label %38
    i8 30, label %53
    i8 40, label %.preheader.preheader
    i8 100, label %71
  ]

.preheader.preheader:                             ; preds = %25
  %.035 = load ptr, ptr %1, align 8, !tbaa !5
  %.035.1 = load ptr, ptr %.035, align 8, !tbaa !5
  %.035.2 = load ptr, ptr %.035.1, align 8, !tbaa !5
  %.035.3 = load ptr, ptr %.035.2, align 8, !tbaa !5
  %.035.4 = load ptr, ptr %.035.3, align 8, !tbaa !5
  %.035.5 = load ptr, ptr %.035.4, align 8, !tbaa !5
  %26 = load ptr, ptr %.035.5, align 8, !tbaa !11
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds i8, ptr %.035.5, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %27, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  call void @flist_sp_remove(ptr noundef nonnull %1, ptr noundef nonnull %.035.5) #6
  call void @flist_sp_remove(ptr noundef nonnull %1, ptr noundef %27) #6
  %32 = call zeroext i1 @flist_sp_contains(ptr noundef nonnull %1, ptr noundef %29) #6
  br i1 %32, label %61, label %64

33:                                               ; preds = %25
  call void @flist_sp_remove_by(ptr noundef nonnull %1, ptr noundef nonnull %5) #6
  %34 = call zeroext i1 @flist_sp_contains(ptr noundef nonnull %1, ptr noundef nonnull %5) #6
  br i1 %34, label %35, label %.critedge40

35:                                               ; preds = %33
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 42, ptr noundef nonnull @.str.4) #8
  br label %.critedge

38:                                               ; preds = %25
  %39 = call ptr @flist_sp_last(ptr noundef nonnull %1) #6
  %40 = call ptr @flist_sp_at(ptr noundef nonnull %1, i32 noundef 9) #6
  %41 = icmp eq ptr %39, %40
  br i1 %41, label %45, label %42

42:                                               ; preds = %38
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 50, ptr noundef nonnull @.str.5) #8
  br label %.critedge

45:                                               ; preds = %38
  %46 = load ptr, ptr %1, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  call void @flist_sp_remove(ptr noundef nonnull %1, ptr noundef %46) #6
  %49 = call zeroext i1 @flist_sp_contains(ptr noundef nonnull %1, ptr noundef %48) #6
  br i1 %49, label %50, label %.critedge40

50:                                               ; preds = %45
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 55, ptr noundef nonnull @.str.6) #8
  br label %.critedge

53:                                               ; preds = %25
  %54 = load ptr, ptr %1, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !13
  call void @flist_sp_remove_by(ptr noundef nonnull %1, ptr noundef %56) #6
  %57 = call zeroext i1 @flist_sp_contains(ptr noundef nonnull %1, ptr noundef %56) #6
  br i1 %57, label %58, label %.critedge40

58:                                               ; preds = %53
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 62, ptr noundef nonnull @.str.6) #8
  br label %.critedge

61:                                               ; preds = %.preheader.preheader
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 83, ptr noundef nonnull @.str.7) #8
  br label %.critedge

64:                                               ; preds = %.preheader.preheader
  %65 = call zeroext i1 @flist_sp_contains(ptr noundef nonnull %1, ptr noundef %31) #6
  br i1 %65, label %66, label %69

66:                                               ; preds = %64
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 84, ptr noundef nonnull @.str.8) #8
  br label %.critedge

69:                                               ; preds = %64
  %70 = icmp eq i32 %.03443, 100
  br i1 %70, label %71, label %.critedge40

71:                                               ; preds = %25, %69
  call void @flist_sp_destroy(ptr noundef nonnull %1) #6
  %72 = load ptr, ptr %1, align 8, !tbaa !5
  %.not38 = icmp eq ptr %72, null
  br i1 %.not38, label %.critedge40, label %73

73:                                               ; preds = %71
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 90, ptr noundef nonnull @.str.9) #8
  br label %.critedge

.critedge40:                                      ; preds = %53, %45, %33, %25, %69, %71
  %76 = add nuw nsw i32 %.03443, 1
  %exitcond.not = icmp eq i32 %76, 200
  br i1 %exitcond.not, label %77, label %4, !llvm.loop !14

77:                                               ; preds = %.critedge40
  call void @flist_sp_destroy(ptr noundef nonnull %1) #6
  br label %.critedge

.critedge:                                        ; preds = %58, %61, %66, %50, %42, %77, %73, %35, %22, %17, %12
  %.sroa.12.7 = phi i32 [ 0, %35 ], [ 0, %73 ], [ 0, %58 ], [ 0, %22 ], [ 0, %12 ], [ 0, %17 ], [ 1, %77 ], [ 0, %42 ], [ 0, %50 ], [ 0, %66 ], [ 0, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %.fca.1.insert = insertvalue { ptr, i32 } { ptr null, i32 undef }, i32 %.sroa.12.7, 1
  ret { ptr, i32 } %.fca.1.insert
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare double @drand48() local_unnamed_addr #2

declare void @flist_sp_insert(ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare void @flist_sp_append(ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare void @flist_sp_remove_by(ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @flist_sp_last(ptr noundef) local_unnamed_addr #4

declare ptr @flist_sp_at(ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @flist_sp_remove(ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare void @flist_sp_destroy(ptr noundef) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"FListItem", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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