; LLVM IR from mncoppola/rpef :: utilities_src/squashfs4.1/squashfs-tools (pseudo)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [44 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @add_pseudo(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [1024 x i8], align 16
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %11 = load ptr, ptr %7, align 8, !tbaa !5
  %12 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %13 = call ptr @get_component(ptr noundef %11, ptr noundef %12)
  store ptr %13, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %35

16:                                               ; preds = %4
  %17 = call noalias ptr @malloc(i64 noundef 16) #8
  store ptr %17, ptr %5, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %28

19:                                               ; preds = %16
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str) #7
  br label %23

23:                                               ; preds = %20
  call void @exit(i32 noundef 1) #9
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27, %16
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.pseudo, ptr %29, i32 0, i32 0
  store i32 0, ptr %30, align 8, !tbaa !9
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.pseudo, ptr %31, i32 0, i32 1
  store i32 0, ptr %32, align 4, !tbaa !12
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.pseudo, ptr %33, i32 0, i32 2
  store ptr null, ptr %34, align 8, !tbaa !13
  br label %35

35:                                               ; preds = %28, %4
  store i32 0, ptr %10, align 4, !tbaa !14
  br label %36

36:                                               ; preds = %56, %35
  %37 = load i32, ptr %10, align 4, !tbaa !14
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.pseudo, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !9
  %41 = icmp slt i32 %37, %40
  br i1 %41, label %42, label %59

42:                                               ; preds = %36
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.pseudo, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = load i32, ptr %10, align 4, !tbaa !14
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.pseudo_entry, ptr %45, i64 %47
  %49 = getelementptr inbounds %struct.pseudo_entry, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %52 = call i32 @strcmp(ptr noundef %50, ptr noundef %51) #10
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %42
  br label %59

55:                                               ; preds = %42
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %10, align 4, !tbaa !14
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %10, align 4, !tbaa !14
  br label %36, !llvm.loop !17

59:                                               ; preds = %54, %36
  %60 = load i32, ptr %10, align 4, !tbaa !14
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.pseudo, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = icmp eq i32 %60, %63
  br i1 %64, label %65, label %153

65:                                               ; preds = %59
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.pseudo, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 8, !tbaa !9
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.pseudo, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load i32, ptr %10, align 4, !tbaa !14
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = mul i64 %75, 32
  %77 = call ptr @realloc(ptr noundef %72, i64 noundef %76) #11
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.pseudo, ptr %78, i32 0, i32 2
  store ptr %77, ptr %79, align 8, !tbaa !13
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.pseudo, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !13
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %93

84:                                               ; preds = %65
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr @stderr, align 8, !tbaa !5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str) #7
  br label %88

88:                                               ; preds = %85
  call void @exit(i32 noundef 1) #9
  unreachable

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92, %65
  %94 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %95 = call noalias ptr @strdup(ptr noundef %94) #7
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.pseudo, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = load i32, ptr %10, align 4, !tbaa !14
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %struct.pseudo_entry, ptr %98, i64 %100
  %102 = getelementptr inbounds %struct.pseudo_entry, ptr %101, i32 0, i32 0
  store ptr %95, ptr %102, align 8, !tbaa !15
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 0
  %105 = load i8, ptr %104, align 1, !tbaa !19
  %106 = sext i8 %105 to i32
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %133

108:                                              ; preds = %93
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.pseudo, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = load i32, ptr %10, align 4, !tbaa !14
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds %struct.pseudo_entry, ptr %111, i64 %113
  %115 = getelementptr inbounds %struct.pseudo_entry, ptr %114, i32 0, i32 2
  store ptr null, ptr %115, align 8, !tbaa !20
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = call noalias ptr @strdup(ptr noundef %116) #7
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.pseudo, ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = load i32, ptr %10, align 4, !tbaa !14
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %struct.pseudo_entry, ptr %120, i64 %122
  %124 = getelementptr inbounds %struct.pseudo_entry, ptr %123, i32 0, i32 1
  store ptr %117, ptr %124, align 8, !tbaa !21
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.pseudo, ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !13
  %129 = load i32, ptr %10, align 4, !tbaa !14
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds %struct.pseudo_entry, ptr %128, i64 %130
  %132 = getelementptr inbounds %struct.pseudo_entry, ptr %131, i32 0, i32 3
  store ptr %125, ptr %132, align 8, !tbaa !22
  br label %152

133:                                              ; preds = %93
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.pseudo, ptr %134, i32 0, i32 2
  %136 = load ptr, ptr %135, align 8, !tbaa !13
  %137 = load i32, ptr %10, align 4, !tbaa !14
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct.pseudo_entry, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.pseudo_entry, ptr %139, i32 0, i32 3
  store ptr null, ptr %140, align 8, !tbaa !22
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = call ptr @add_pseudo(ptr noundef null, ptr noundef %141, ptr noundef %142, ptr noundef %143)
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.pseudo, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !13
  %148 = load i32, ptr %10, align 4, !tbaa !14
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %struct.pseudo_entry, ptr %147, i64 %149
  %151 = getelementptr inbounds %struct.pseudo_entry, ptr %150, i32 0, i32 2
  store ptr %144, ptr %151, align 8, !tbaa !20
  br label %152

152:                                              ; preds = %133, %108
  br label %295

153:                                              ; preds = %59
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.pseudo, ptr %154, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !13
  %157 = load i32, ptr %10, align 4, !tbaa !14
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %struct.pseudo_entry, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.pseudo_entry, ptr %159, i32 0, i32 2
  %161 = load ptr, ptr %160, align 8, !tbaa !20
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %231

163:                                              ; preds = %153
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds i8, ptr %164, i64 0
  %166 = load i8, ptr %165, align 1, !tbaa !19
  %167 = sext i8 %166 to i32
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %203

169:                                              ; preds = %163
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.pseudo, ptr %170, i32 0, i32 2
  %172 = load ptr, ptr %171, align 8, !tbaa !13
  %173 = load i32, ptr %10, align 4, !tbaa !14
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds %struct.pseudo_entry, ptr %172, i64 %174
  %176 = getelementptr inbounds %struct.pseudo_entry, ptr %175, i32 0, i32 3
  %177 = load ptr, ptr %176, align 8, !tbaa !22
  %178 = getelementptr inbounds %struct.pseudo_dev, ptr %177, i32 0, i32 0
  %179 = load i8, ptr %178, align 4, !tbaa !23
  %180 = sext i8 %179 to i32
  %181 = icmp eq i32 %180, 100
  br i1 %181, label %182, label %194

182:                                              ; preds = %169
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = call ptr @add_pseudo(ptr noundef null, ptr noundef %183, ptr noundef %184, ptr noundef %185)
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.pseudo, ptr %187, i32 0, i32 2
  %189 = load ptr, ptr %188, align 8, !tbaa !13
  %190 = load i32, ptr %10, align 4, !tbaa !14
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds %struct.pseudo_entry, ptr %189, i64 %191
  %193 = getelementptr inbounds %struct.pseudo_entry, ptr %192, i32 0, i32 2
  store ptr %186, ptr %193, align 8, !tbaa !20
  br label %202

194:                                              ; preds = %169
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr @stderr, align 8, !tbaa !5
  %197 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %196, ptr noundef @.str.1, ptr noundef %197, ptr noundef %198) #7
  br label %200

200:                                              ; preds = %195
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201, %182
  br label %230

203:                                              ; preds = %163
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.pseudo, ptr %205, i32 0, i32 2
  %207 = load ptr, ptr %206, align 8, !tbaa !13
  %208 = load i32, ptr %10, align 4, !tbaa !14
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds %struct.pseudo_entry, ptr %207, i64 %209
  %211 = getelementptr inbounds %struct.pseudo_entry, ptr %210, i32 0, i32 3
  %212 = load ptr, ptr %211, align 8, !tbaa !22
  %213 = call i32 @memcmp(ptr noundef %204, ptr noundef %212, i64 noundef 36) #10
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %215, label %222

215:                                              ; preds = %203
  br label %216

216:                                              ; preds = %215
  %217 = load ptr, ptr @stderr, align 8, !tbaa !5
  %218 = load ptr, ptr %8, align 8, !tbaa !5
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %217, ptr noundef @.str.2, ptr noundef %218) #7
  br label %220

220:                                              ; preds = %216
  br label %221

221:                                              ; preds = %220
  br label %229

222:                                              ; preds = %203
  br label %223

223:                                              ; preds = %222
  %224 = load ptr, ptr @stderr, align 8, !tbaa !5
  %225 = load ptr, ptr %8, align 8, !tbaa !5
  %226 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %224, ptr noundef @.str.3, ptr noundef %225) #7
  br label %227

227:                                              ; preds = %223
  br label %228

228:                                              ; preds = %227
  br label %229

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

230:                                              ; preds = %229, %202
  br label %294

231:                                              ; preds = %153
  %232 = load ptr, ptr %7, align 8, !tbaa !5
  %233 = getelementptr inbounds i8, ptr %232, i64 0
  %234 = load i8, ptr %233, align 1, !tbaa !19
  %235 = sext i8 %234 to i32
  %236 = icmp eq i32 %235, 0
  br i1 %236, label %237, label %280

237:                                              ; preds = %231
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.pseudo, ptr %238, i32 0, i32 2
  %240 = load ptr, ptr %239, align 8, !tbaa !13
  %241 = load i32, ptr %10, align 4, !tbaa !14
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds %struct.pseudo_entry, ptr %240, i64 %242
  %244 = getelementptr inbounds %struct.pseudo_entry, ptr %243, i32 0, i32 3
  %245 = load ptr, ptr %244, align 8, !tbaa !22
  %246 = icmp eq ptr %245, null
  br i1 %246, label %247, label %271

247:                                              ; preds = %237
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.pseudo_dev, ptr %248, i32 0, i32 0
  %250 = load i8, ptr %249, align 4, !tbaa !23
  %251 = sext i8 %250 to i32
  %252 = icmp eq i32 %251, 100
  br i1 %252, label %253, label %271

253:                                              ; preds = %247
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = call noalias ptr @strdup(ptr noundef %254) #7
  %256 = load ptr, ptr %5, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.pseudo, ptr %256, i32 0, i32 2
  %258 = load ptr, ptr %257, align 8, !tbaa !13
  %259 = load i32, ptr %10, align 4, !tbaa !14
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds %struct.pseudo_entry, ptr %258, i64 %260
  %262 = getelementptr inbounds %struct.pseudo_entry, ptr %261, i32 0, i32 1
  store ptr %255, ptr %262, align 8, !tbaa !21
  %263 = load ptr, ptr %6, align 8, !tbaa !5
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.pseudo, ptr %264, i32 0, i32 2
  %266 = load ptr, ptr %265, align 8, !tbaa !13
  %267 = load i32, ptr %10, align 4, !tbaa !14
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds %struct.pseudo_entry, ptr %266, i64 %268
  %270 = getelementptr inbounds %struct.pseudo_entry, ptr %269, i32 0, i32 3
  store ptr %263, ptr %270, align 8, !tbaa !22
  br label %279

271:                                              ; preds = %247, %237
  br label %272

272:                                              ; preds = %271
  %273 = load ptr, ptr @stderr, align 8, !tbaa !5
  %274 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %275 = load ptr, ptr %8, align 8, !tbaa !5
  %276 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %273, ptr noundef @.str.4, ptr noundef %274, ptr noundef %275) #7
  br label %277

277:                                              ; preds = %272
  br label %278

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278, %253
  br label %293

280:                                              ; preds = %231
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.pseudo, ptr %281, i32 0, i32 2
  %283 = load ptr, ptr %282, align 8, !tbaa !13
  %284 = load i32, ptr %10, align 4, !tbaa !14
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds %struct.pseudo_entry, ptr %283, i64 %285
  %287 = getelementptr inbounds %struct.pseudo_entry, ptr %286, i32 0, i32 2
  %288 = load ptr, ptr %287, align 8, !tbaa !20
  %289 = load ptr, ptr %6, align 8, !tbaa !5
  %290 = load ptr, ptr %7, align 8, !tbaa !5
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = call ptr @add_pseudo(ptr noundef %288, ptr noundef %289, ptr noundef %290, ptr noundef %291)
  br label %293

293:                                              ; preds = %280, %279
  br label %294

294:                                              ; preds = %293, %230
  br label %295

295:                                              ; preds = %294, %152
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %9) #7
  ret ptr %296
}

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

; Function Attrs: nounwind uwtable
declare hidden ptr @get_component(ptr noundef, ptr noundef) #0

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #6

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

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

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 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 #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 = { 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 #5 = { nounwind willreturn memory(read) "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 allocsize(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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { nounwind allocsize(1) }

!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, !11, i64 0}
!10 = !{!"pseudo", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !6, i64 8}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"pseudo_entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!7, !7, i64 0}
!20 = !{!16, !6, i64 16}
!21 = !{!16, !6, i64 8}
!22 = !{!16, !6, i64 24}
!23 = !{!24, !7, i64 0}
!24 = !{!"pseudo_dev", !7, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}


; 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.pseudo_entry = type { ptr, ptr, ptr, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [44 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @add_pseudo(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #9
  %6 = call ptr @get_component(ptr noundef %2, ptr noundef nonnull %5)
  %7 = icmp eq ptr %0, null
  br i1 %7, label %8, label %13

8:                                                ; preds = %4
  %calloc = call dereferenceable_or_null(16) ptr @calloc(i64 1, i64 16)
  %9 = icmp eq ptr %calloc, null
  br i1 %9, label %10, label %._crit_edge.thread

10:                                               ; preds = %8
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str) #10
  call void @exit(i32 noundef 1) #11
  unreachable

13:                                               ; preds = %4
  %.pre = load i32, ptr %0, align 8, !tbaa !9
  %14 = icmp sgt i32 %.pre, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %wide.trip.count = zext nneg i32 %.pre to i64
  br label %17

17:                                               ; preds = %.lr.ph, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %22 ]
  %18 = getelementptr inbounds %struct.pseudo_entry, ptr %16, i64 %indvars.iv
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) %5) #12
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %._crit_edge.loopexit, label %22

22:                                               ; preds = %17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.thread, label %17, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %17
  %23 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %13
  %.0.lcssa = phi i32 [ 0, %13 ], [ %23, %._crit_edge.loopexit ]
  %24 = icmp eq i32 %.0.lcssa, %.pre
  br i1 %24, label %._crit_edge.thread, label %52

._crit_edge.thread:                               ; preds = %22, %8, %._crit_edge
  %25 = phi i32 [ %.pre, %._crit_edge ], [ 0, %8 ], [ %.pre, %22 ]
  %.0678185 = phi ptr [ %0, %._crit_edge ], [ %calloc, %8 ], [ %0, %22 ]
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %.0678185, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %.0678185, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  %29 = zext nneg i32 %26 to i64
  %30 = shl nuw nsw i64 %29, 5
  %31 = call ptr @realloc(ptr noundef %28, i64 noundef %30) #13
  store ptr %31, ptr %27, align 8, !tbaa !12
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %36

33:                                               ; preds = %._crit_edge.thread
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str) #10
  call void @exit(i32 noundef 1) #11
  unreachable

36:                                               ; preds = %._crit_edge.thread
  %37 = call noalias ptr @strdup(ptr noundef nonnull %5) #9
  %38 = zext nneg i32 %25 to i64
  %39 = getelementptr inbounds %struct.pseudo_entry, ptr %31, i64 %38
  store ptr %37, ptr %39, align 8, !tbaa !13
  %40 = load i8, ptr %6, align 1, !tbaa !17
  %41 = icmp eq i8 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %36
  %43 = getelementptr inbounds %struct.pseudo_entry, ptr %31, i64 %38, i32 2
  store ptr null, ptr %43, align 8, !tbaa !18
  %44 = call noalias ptr @strdup(ptr noundef %3) #9
  %45 = getelementptr inbounds %struct.pseudo_entry, ptr %31, i64 %38, i32 1
  store ptr %44, ptr %45, align 8, !tbaa !19
  %46 = getelementptr inbounds %struct.pseudo_entry, ptr %31, i64 %38, i32 3
  store ptr %1, ptr %46, align 8, !tbaa !20
  br label %97

47:                                               ; preds = %36
  %48 = getelementptr inbounds %struct.pseudo_entry, ptr %31, i64 %38, i32 3
  store ptr null, ptr %48, align 8, !tbaa !20
  %49 = call ptr @add_pseudo(ptr noundef null, ptr noundef %1, ptr noundef nonnull %6, ptr noundef %3)
  %50 = load ptr, ptr %27, align 8, !tbaa !12
  %51 = getelementptr inbounds %struct.pseudo_entry, ptr %50, i64 %38, i32 2
  store ptr %49, ptr %51, align 8, !tbaa !18
  br label %97

52:                                               ; preds = %._crit_edge
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !12
  %55 = zext nneg i32 %.0.lcssa to i64
  %56 = getelementptr inbounds %struct.pseudo_entry, ptr %54, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = icmp eq ptr %58, null
  %60 = load i8, ptr %6, align 1, !tbaa !17
  %.not = icmp eq i8 %60, 0
  br i1 %59, label %61, label %80

61:                                               ; preds = %52
  %62 = getelementptr inbounds i8, ptr %56, i64 24
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  br i1 %.not, label %74, label %64

64:                                               ; preds = %61
  %65 = load i8, ptr %63, align 4, !tbaa !21
  %66 = icmp eq i8 %65, 100
  br i1 %66, label %67, label %71

67:                                               ; preds = %64
  %68 = call ptr @add_pseudo(ptr noundef null, ptr noundef %1, ptr noundef nonnull %6, ptr noundef %3)
  %69 = load ptr, ptr %53, align 8, !tbaa !12
  %70 = getelementptr inbounds %struct.pseudo_entry, ptr %69, i64 %55, i32 2
  store ptr %68, ptr %70, align 8, !tbaa !18
  br label %97

71:                                               ; preds = %64
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.1, ptr noundef nonnull %5, ptr noundef %3) #10
  br label %97

74:                                               ; preds = %61
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(36) %1, ptr noundef nonnull dereferenceable(36) %63, i64 36)
  %.not72 = icmp eq i32 %bcmp, 0
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  br i1 %.not72, label %78, label %76

76:                                               ; preds = %74
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.2, ptr noundef %3) #10
  br label %97

78:                                               ; preds = %74
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.3, ptr noundef %3) #10
  br label %97

80:                                               ; preds = %52
  br i1 %.not, label %81, label %95

81:                                               ; preds = %80
  %82 = getelementptr inbounds i8, ptr %56, i64 24
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %92

85:                                               ; preds = %81
  %86 = load i8, ptr %1, align 4, !tbaa !21
  %87 = icmp eq i8 %86, 100
  br i1 %87, label %88, label %92

88:                                               ; preds = %85
  %89 = call noalias ptr @strdup(ptr noundef %3) #9
  %90 = getelementptr inbounds %struct.pseudo_entry, ptr %54, i64 %55, i32 1
  store ptr %89, ptr %90, align 8, !tbaa !19
  %91 = getelementptr inbounds %struct.pseudo_entry, ptr %54, i64 %55, i32 3
  store ptr %1, ptr %91, align 8, !tbaa !20
  br label %97

92:                                               ; preds = %81, %85
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.4, ptr noundef nonnull %5, ptr noundef %3) #10
  br label %97

95:                                               ; preds = %80
  %96 = call ptr @add_pseudo(ptr noundef nonnull %58, ptr noundef %1, ptr noundef nonnull %6, ptr noundef %3)
  br label %97

97:                                               ; preds = %76, %78, %67, %71, %88, %92, %95, %42, %47
  %.0678184 = phi ptr [ %0, %76 ], [ %0, %78 ], [ %0, %67 ], [ %0, %71 ], [ %0, %88 ], [ %0, %92 ], [ %0, %95 ], [ %.0678185, %42 ], [ %.0678185, %47 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #9
  ret ptr %.0678184
}

; 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 uwtable
declare hidden ptr @get_component(ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #6

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #8

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 = { 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 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, 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 #6 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, 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 #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #9 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { nounwind allocsize(1) }

!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, !11, i64 0}
!10 = !{!"pseudo", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!14, !6, i64 0}
!14 = !{!"pseudo_entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = !{!14, !6, i64 16}
!19 = !{!14, !6, i64 8}
!20 = !{!14, !6, i64 24}
!21 = !{!22, !7, i64 0}
!22 = !{!"pseudo_dev", !7, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass