; LLVM IR from clibs/clib :: src (clib-configure)

; 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.clib_package_opts_t = type { i32, i32, i32, ptr, i32, ptr }
%struct.debug_t = type { ptr, i32, i32, ptr }
%struct.options = type { ptr, ptr, i32, i32, i32, i32, i32, i32 }
%struct.clib_package_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.list_node = type { ptr, ptr, ptr }
%struct.clib_package_dependency_t = type { ptr, ptr, ptr }

@package_opts = external dso_local global %struct.clib_package_opts_t, align 8
@root_package = external dso_local global ptr, align 8
@configured = external dso_local global ptr, align 8
@debugger = external dso_local global %struct.debug_t, align 8
@rest_argv = external dso_local global ptr, align 8
@rest_argc = external dso_local global i32, align 4
@opts = external dso_local global %struct.options, align 8
@manifest_names = external global [0 x ptr], align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @configure_package_with_manifest_name(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  store i64 4096, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call ptr @path_join(ptr noundef %36, ptr noundef %37)
  store ptr %38, ptr %11, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = icmp eq ptr null, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %2
  store i32 -12, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %418

42:                                               ; preds = %2
  %43 = load ptr, ptr @root_package, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %109, label %45

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %64, %45
  %47 = load i32, ptr %14, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds [0 x ptr], ptr @manifest_names, i64 0, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  store ptr %50, ptr %13, align 8, !tbaa !5
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = call ptr @fs_read(ptr noundef %51)
  store ptr %52, ptr %7, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %46
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = add i32 %54, 1
  store i32 %55, ptr %14, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds [0 x ptr], ptr @manifest_names, i64 0, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = icmp ne ptr null, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %53
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  %63 = xor i1 %62, true
  br label %64

64:                                               ; preds = %60, %53
  %65 = phi i1 [ false, %53 ], [ %63, %60 ]
  br i1 %65, label %46, label %66, !llvm.loop !13

66:                                               ; preds = %64
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %73

69:                                               ; preds = %66
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 3), align 4, !tbaa !15
  %72 = call ptr @clib_package_new(ptr noundef %70, i32 noundef %71)
  store ptr %72, ptr @root_package, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %69, %66
  %74 = load ptr, ptr @root_package, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %108

76:                                               ; preds = %73
  %77 = load ptr, ptr @root_package, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.clib_package_t, ptr %77, i32 0, i32 14
  %79 = load ptr, ptr %78, align 8, !tbaa !17
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %108

81:                                               ; preds = %76
  %82 = load i64, ptr %10, align 8, !tbaa !11
  %83 = call ptr @llvm.stacksave.p0()
  store ptr %83, ptr %15, align 8
  %84 = alloca i8, i64 %82, align 16
  store i64 %82, ptr %16, align 8
  %85 = load i64, ptr %10, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %84, i8 0, i64 %85, i1 false)
  %86 = load ptr, ptr @root_package, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.clib_package_t, ptr %86, i32 0, i32 14
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = call ptr @realpath(ptr noundef %88, ptr noundef %84) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %90 = call i64 @strlen(ptr noundef %84) #10
  %91 = add i64 %90, 1
  store i64 %91, ptr %17, align 8, !tbaa !11
  %92 = load ptr, ptr @root_package, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.clib_package_t, ptr %92, i32 0, i32 14
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  call void @free(ptr noundef %94) #9
  %95 = load i64, ptr %17, align 8, !tbaa !11
  %96 = call noalias ptr @malloc(i64 noundef %95) #11
  %97 = load ptr, ptr @root_package, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.clib_package_t, ptr %97, i32 0, i32 14
  store ptr %96, ptr %98, align 8, !tbaa !17
  %99 = load ptr, ptr @root_package, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.clib_package_t, ptr %99, i32 0, i32 14
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  %102 = load i64, ptr %17, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %101, i8 0, i64 %102, i1 false)
  %103 = load ptr, ptr @root_package, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.clib_package_t, ptr %103, i32 0, i32 14
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = load i64, ptr %17, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 16 %84, i64 %106, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  %107 = load ptr, ptr %15, align 8
  call void @llvm.stackrestore.p0(ptr %107)
  br label %108

108:                                              ; preds = %81, %76, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %109

109:                                              ; preds = %108, %42
  %110 = load ptr, ptr @configured, align 8, !tbaa !5
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = call i32 @hash_has(ptr noundef %110, ptr noundef %111)
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %109
  br label %397

115:                                              ; preds = %109
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %116) #9
  store ptr null, ptr %7, align 8, !tbaa !5
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = call i32 @fs_exists(ptr noundef %117)
  %119 = icmp eq i32 0, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %115
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @debugger, ptr noundef @.str.1, ptr noundef %121)
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = call ptr @fs_read(ptr noundef %122)
  store ptr %123, ptr %7, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %120, %115
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = icmp ne ptr null, %125
  br i1 %126, label %127, label %130

127:                                              ; preds = %124
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = call ptr @clib_package_new(ptr noundef %128, i32 noundef 0)
  store ptr %129, ptr %6, align 8, !tbaa !5
  br label %133

130:                                              ; preds = %124
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = call ptr @clib_package_new_from_slug(ptr noundef %131, i32 noundef 0)
  store ptr %132, ptr %6, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %130, %127
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = icmp eq ptr null, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %133
  store i32 -12, ptr %9, align 4, !tbaa !9
  br label %397

137:                                              ; preds = %133
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.clib_package_t, ptr %138, i32 0, i32 13
  %140 = load ptr, ptr %139, align 8, !tbaa !19
  %141 = icmp ne ptr null, %140
  br i1 %141, label %142, label %156

142:                                              ; preds = %137
  %143 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 6), align 8, !tbaa !20
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %156

145:                                              ; preds = %142
  %146 = load ptr, ptr @configured, align 8, !tbaa !5
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  call void @hash_set(ptr noundef %146, ptr noundef %147, ptr noundef @.str.2)
  store i32 1, ptr %8, align 4, !tbaa !9
  %148 = load ptr, ptr @stdout, align 8, !tbaa !5
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.clib_package_t, ptr %149, i32 0, i32 13
  %151 = load ptr, ptr %150, align 8, !tbaa !19
  %152 = call ptr @trim(ptr noundef %151)
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.3, ptr noundef %152) #9
  %154 = load ptr, ptr @stdout, align 8, !tbaa !5
  %155 = call i32 @fflush(ptr noundef %154)
  br label %269

156:                                              ; preds = %142, %137
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.clib_package_t, ptr %157, i32 0, i32 3
  %159 = load ptr, ptr %158, align 8, !tbaa !21
  %160 = icmp ne ptr null, %159
  br i1 %160, label %161, label %265

161:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %162 = load i32, ptr @rest_argc, align 4, !tbaa !9
  %163 = icmp sgt i32 %162, 0
  br i1 %163, label %164, label %168

164:                                              ; preds = %161
  %165 = load ptr, ptr @rest_argv, align 8, !tbaa !5
  %166 = load i32, ptr @rest_argc, align 4, !tbaa !9
  %167 = call ptr @str_flatten(ptr noundef %165, i32 noundef 0, i32 noundef %166)
  br label %169

168:                                              ; preds = %161
  br label %169

169:                                              ; preds = %168, %164
  %170 = phi ptr [ %167, %164 ], [ @.str.4, %168 ]
  store ptr %170, ptr %19, align 8, !tbaa !5
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.clib_package_t, ptr %172, i32 0, i32 3
  %174 = load ptr, ptr %173, align 8, !tbaa !21
  %175 = load ptr, ptr %19, align 8, !tbaa !5
  %176 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %18, ptr noundef @.str.5, ptr noundef %171, ptr noundef %174, ptr noundef %175)
  %177 = load ptr, ptr @root_package, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %190

179:                                              ; preds = %169
  %180 = load ptr, ptr @root_package, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.clib_package_t, ptr %180, i32 0, i32 14
  %182 = load ptr, ptr %181, align 8, !tbaa !17
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %190

184:                                              ; preds = %179
  %185 = load ptr, ptr @root_package, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.clib_package_t, ptr %185, i32 0, i32 14
  %187 = load ptr, ptr %186, align 8, !tbaa !17
  store ptr %187, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 3), align 8, !tbaa !22
  call void @clib_package_set_opts(ptr noundef byval(%struct.clib_package_opts_t) align 8 @package_opts)
  %188 = load ptr, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 3), align 8, !tbaa !22
  %189 = call i32 @setenv(ptr noundef @.str.6, ptr noundef %188, i32 noundef 1) #9
  br label %234

190:                                              ; preds = %179, %169
  %191 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !24
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %196

193:                                              ; preds = %190
  %194 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !24
  %195 = call i32 @setenv(ptr noundef @.str.6, ptr noundef %194, i32 noundef 1) #9
  br label %233

196:                                              ; preds = %190
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.clib_package_t, ptr %197, i32 0, i32 14
  %199 = load ptr, ptr %198, align 8, !tbaa !17
  %200 = icmp ne ptr %199, null
  br i1 %200, label %201, label %232

201:                                              ; preds = %196
  %202 = load i64, ptr %10, align 8, !tbaa !11
  %203 = call ptr @llvm.stacksave.p0()
  store ptr %203, ptr %20, align 8
  %204 = alloca i8, i64 %202, align 16
  store i64 %202, ptr %21, align 8
  %205 = load i64, ptr %10, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %204, i8 0, i64 %205, i1 false)
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.clib_package_t, ptr %206, i32 0, i32 14
  %208 = load ptr, ptr %207, align 8, !tbaa !17
  %209 = call ptr @realpath(ptr noundef %208, ptr noundef %204) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %210 = call i64 @strlen(ptr noundef %204) #10
  %211 = add i64 %210, 1
  store i64 %211, ptr %22, align 8, !tbaa !11
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.clib_package_t, ptr %212, i32 0, i32 14
  %214 = load ptr, ptr %213, align 8, !tbaa !17
  call void @free(ptr noundef %214) #9
  %215 = load i64, ptr %22, align 8, !tbaa !11
  %216 = call noalias ptr @malloc(i64 noundef %215) #11
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.clib_package_t, ptr %217, i32 0, i32 14
  store ptr %216, ptr %218, align 8, !tbaa !17
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.clib_package_t, ptr %219, i32 0, i32 14
  %221 = load ptr, ptr %220, align 8, !tbaa !17
  %222 = load i64, ptr %22, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %221, i8 0, i64 %222, i1 false)
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.clib_package_t, ptr %223, i32 0, i32 14
  %225 = load ptr, ptr %224, align 8, !tbaa !17
  %226 = load i64, ptr %22, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %225, ptr align 16 %204, i64 %226, i1 false)
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.clib_package_t, ptr %227, i32 0, i32 14
  %229 = load ptr, ptr %228, align 8, !tbaa !17
  %230 = call i32 @setenv(ptr noundef @.str.6, ptr noundef %229, i32 noundef 1) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  %231 = load ptr, ptr %20, align 8
  call void @llvm.stackrestore.p0(ptr %231)
  br label %232

232:                                              ; preds = %201, %196
  br label %233

233:                                              ; preds = %232, %193
  br label %234

234:                                              ; preds = %233, %184
  %235 = load i32, ptr @rest_argc, align 4, !tbaa !9
  %236 = icmp sgt i32 %235, 0
  br i1 %236, label %237, label %239

237:                                              ; preds = %234
  %238 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %238) #9
  br label %239

239:                                              ; preds = %237, %234
  %240 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 3), align 4, !tbaa !15
  %241 = icmp ne i32 0, %240
  br i1 %241, label %242, label %258

242:                                              ; preds = %239
  %243 = load ptr, ptr @stdout, align 8, !tbaa !5
  %244 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 4, ptr noundef %243, ptr noundef @.str.7, ptr noundef @.str.8)
  %245 = load ptr, ptr @stdout, align 8, !tbaa !5
  %246 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %245, ptr noundef @.str.9) #9
  %247 = load ptr, ptr @stdout, align 8, !tbaa !5
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.clib_package_t, ptr %248, i32 0, i32 6
  %250 = load ptr, ptr %249, align 8, !tbaa !25
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.clib_package_t, ptr %251, i32 0, i32 3
  %253 = load ptr, ptr %252, align 8, !tbaa !21
  %254 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %247, ptr noundef @.str.10, ptr noundef %250, ptr noundef %253)
  %255 = load ptr, ptr @stdout, align 8, !tbaa !5
  %256 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %255, ptr noundef @.str.11) #9
  store i32 %256, ptr %23, align 4, !tbaa !9
  %257 = load i32, ptr %23, align 4, !tbaa !9
  br label %258

258:                                              ; preds = %242, %239
  %259 = load ptr, ptr %18, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @debugger, ptr noundef @.str.12, ptr noundef %259)
  %260 = load ptr, ptr %18, align 8, !tbaa !5
  %261 = call i32 @system(ptr noundef %260)
  store i32 %261, ptr %9, align 4, !tbaa !9
  %262 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %262) #9
  store ptr null, ptr %18, align 8, !tbaa !5
  %263 = load ptr, ptr @configured, align 8, !tbaa !5
  %264 = load ptr, ptr %11, align 8, !tbaa !5
  call void @hash_set(ptr noundef %263, ptr noundef %264, ptr noundef @.str.2)
  store i32 1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %268

265:                                              ; preds = %156
  %266 = load ptr, ptr @configured, align 8, !tbaa !5
  %267 = load ptr, ptr %11, align 8, !tbaa !5
  call void @hash_set(ptr noundef %266, ptr noundef %267, ptr noundef @.str.13)
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %268

268:                                              ; preds = %265, %258
  br label %269

269:                                              ; preds = %268, %145
  %270 = load i32, ptr %9, align 4, !tbaa !9
  %271 = icmp ne i32 0, %270
  br i1 %271, label %272, label %273

272:                                              ; preds = %269
  br label %397

273:                                              ; preds = %269
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.clib_package_t, ptr %274, i32 0, i32 15
  %276 = load ptr, ptr %275, align 8, !tbaa !26
  %277 = icmp ne ptr null, %276
  br i1 %277, label %278, label %333

278:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store ptr null, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  store ptr null, ptr %25, align 8, !tbaa !5
  %279 = load ptr, ptr %6, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.clib_package_t, ptr %279, i32 0, i32 15
  %281 = load ptr, ptr %280, align 8, !tbaa !26
  %282 = call ptr @list_iterator_new(ptr noundef %281, i32 noundef 0)
  store ptr %282, ptr %24, align 8, !tbaa !5
  br label %283

283:                                              ; preds = %323, %278
  %284 = load ptr, ptr %24, align 8, !tbaa !5
  %285 = call ptr @list_iterator_next(ptr noundef %284)
  store ptr %285, ptr %25, align 8, !tbaa !5
  %286 = icmp ne ptr %285, null
  br i1 %286, label %287, label %324

287:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %288 = load ptr, ptr %25, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.list_node, ptr %288, i32 0, i32 2
  %290 = load ptr, ptr %289, align 8, !tbaa !27
  store ptr %290, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  store ptr null, ptr %27, align 8, !tbaa !5
  %291 = load ptr, ptr %26, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.clib_package_dependency_t, ptr %291, i32 0, i32 1
  %293 = load ptr, ptr %292, align 8, !tbaa !29
  %294 = load ptr, ptr %26, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.clib_package_dependency_t, ptr %294, i32 0, i32 0
  %296 = load ptr, ptr %295, align 8, !tbaa !31
  %297 = load ptr, ptr %26, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.clib_package_dependency_t, ptr %297, i32 0, i32 2
  %299 = load ptr, ptr %298, align 8, !tbaa !32
  %300 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %27, ptr noundef @.str.14, ptr noundef %293, ptr noundef %296, ptr noundef %299)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %301 = load ptr, ptr %27, align 8, !tbaa !5
  %302 = call ptr @clib_package_new_from_slug(ptr noundef %301, i32 noundef 0)
  store ptr %302, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %303 = load ptr, ptr @opts, align 8, !tbaa !33
  %304 = load ptr, ptr %28, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.clib_package_t, ptr %304, i32 0, i32 6
  %306 = load ptr, ptr %305, align 8, !tbaa !25
  %307 = call ptr @path_join(ptr noundef %303, ptr noundef %306)
  store ptr %307, ptr %29, align 8, !tbaa !5
  %308 = load ptr, ptr %27, align 8, !tbaa !5
  call void @free(ptr noundef %308) #9
  %309 = load ptr, ptr %28, align 8, !tbaa !5
  call void @clib_package_free(ptr noundef %309)
  %310 = load ptr, ptr %29, align 8, !tbaa !5
  %311 = icmp eq ptr null, %310
  br i1 %311, label %312, label %313

312:                                              ; preds = %287
  store i32 -12, ptr %9, align 4, !tbaa !9
  store i32 4, ptr %12, align 4
  br label %321

313:                                              ; preds = %287
  %314 = load ptr, ptr %29, align 8, !tbaa !5
  %315 = call i32 @configure_package(ptr noundef %314)
  store i32 %315, ptr %9, align 4, !tbaa !9
  %316 = load ptr, ptr %29, align 8, !tbaa !5
  call void @free(ptr noundef %316) #9
  %317 = load i32, ptr %9, align 4, !tbaa !9
  %318 = icmp ne i32 0, %317
  br i1 %318, label %319, label %320

319:                                              ; preds = %313
  store i32 4, ptr %12, align 4
  br label %321

320:                                              ; preds = %313
  store i32 0, ptr %12, align 4
  br label %321

321:                                              ; preds = %320, %319, %312
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  %322 = load i32, ptr %12, align 4
  switch i32 %322, label %330 [
    i32 0, label %323
  ]

323:                                              ; preds = %321
  br label %283, !llvm.loop !34

324:                                              ; preds = %283
  %325 = load ptr, ptr %24, align 8, !tbaa !5
  %326 = icmp ne ptr null, %325
  br i1 %326, label %327, label %329

327:                                              ; preds = %324
  %328 = load ptr, ptr %24, align 8, !tbaa !5
  call void @list_iterator_destroy(ptr noundef %328)
  br label %329

329:                                              ; preds = %327, %324
  store i32 0, ptr %12, align 4
  br label %330

330:                                              ; preds = %329, %321
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  %331 = load i32, ptr %12, align 4
  switch i32 %331, label %418 [
    i32 0, label %332
    i32 4, label %397
  ]

332:                                              ; preds = %330
  br label %333

333:                                              ; preds = %332, %273
  %334 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 4), align 8, !tbaa !35
  %335 = icmp ne i32 %334, 0
  br i1 %335, label %336, label %396

336:                                              ; preds = %333
  %337 = load ptr, ptr %6, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.clib_package_t, ptr %337, i32 0, i32 16
  %339 = load ptr, ptr %338, align 8, !tbaa !36
  %340 = icmp ne ptr null, %339
  br i1 %340, label %341, label %396

341:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  store ptr null, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  store ptr null, ptr %31, align 8, !tbaa !5
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.clib_package_t, ptr %342, i32 0, i32 16
  %344 = load ptr, ptr %343, align 8, !tbaa !36
  %345 = call ptr @list_iterator_new(ptr noundef %344, i32 noundef 0)
  store ptr %345, ptr %30, align 8, !tbaa !5
  br label %346

346:                                              ; preds = %386, %341
  %347 = load ptr, ptr %30, align 8, !tbaa !5
  %348 = call ptr @list_iterator_next(ptr noundef %347)
  store ptr %348, ptr %31, align 8, !tbaa !5
  %349 = icmp ne ptr %348, null
  br i1 %349, label %350, label %387

350:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %351 = load ptr, ptr %31, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.list_node, ptr %351, i32 0, i32 2
  %353 = load ptr, ptr %352, align 8, !tbaa !27
  store ptr %353, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  store ptr null, ptr %33, align 8, !tbaa !5
  %354 = load ptr, ptr %32, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.clib_package_dependency_t, ptr %354, i32 0, i32 1
  %356 = load ptr, ptr %355, align 8, !tbaa !29
  %357 = load ptr, ptr %32, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.clib_package_dependency_t, ptr %357, i32 0, i32 0
  %359 = load ptr, ptr %358, align 8, !tbaa !31
  %360 = load ptr, ptr %32, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.clib_package_dependency_t, ptr %360, i32 0, i32 2
  %362 = load ptr, ptr %361, align 8, !tbaa !32
  %363 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %33, ptr noundef @.str.14, ptr noundef %356, ptr noundef %359, ptr noundef %362)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %364 = load ptr, ptr %33, align 8, !tbaa !5
  %365 = call ptr @clib_package_new_from_slug(ptr noundef %364, i32 noundef 0)
  store ptr %365, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %366 = load ptr, ptr @opts, align 8, !tbaa !33
  %367 = load ptr, ptr %34, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.clib_package_t, ptr %367, i32 0, i32 6
  %369 = load ptr, ptr %368, align 8, !tbaa !25
  %370 = call ptr @path_join(ptr noundef %366, ptr noundef %369)
  store ptr %370, ptr %35, align 8, !tbaa !5
  %371 = load ptr, ptr %33, align 8, !tbaa !5
  call void @free(ptr noundef %371) #9
  %372 = load ptr, ptr %34, align 8, !tbaa !5
  call void @clib_package_free(ptr noundef %372)
  %373 = load ptr, ptr %35, align 8, !tbaa !5
  %374 = icmp eq ptr null, %373
  br i1 %374, label %375, label %376

375:                                              ; preds = %350
  store i32 -12, ptr %9, align 4, !tbaa !9
  store i32 4, ptr %12, align 4
  br label %384

376:                                              ; preds = %350
  %377 = load ptr, ptr %35, align 8, !tbaa !5
  %378 = call i32 @configure_package(ptr noundef %377)
  store i32 %378, ptr %9, align 4, !tbaa !9
  %379 = load ptr, ptr %35, align 8, !tbaa !5
  call void @free(ptr noundef %379) #9
  %380 = load i32, ptr %9, align 4, !tbaa !9
  %381 = icmp ne i32 0, %380
  br i1 %381, label %382, label %383

382:                                              ; preds = %376
  store i32 4, ptr %12, align 4
  br label %384

383:                                              ; preds = %376
  store i32 0, ptr %12, align 4
  br label %384

384:                                              ; preds = %383, %382, %375
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  %385 = load i32, ptr %12, align 4
  switch i32 %385, label %393 [
    i32 0, label %386
  ]

386:                                              ; preds = %384
  br label %346, !llvm.loop !37

387:                                              ; preds = %346
  %388 = load ptr, ptr %30, align 8, !tbaa !5
  %389 = icmp ne ptr null, %388
  br i1 %389, label %390, label %392

390:                                              ; preds = %387
  %391 = load ptr, ptr %30, align 8, !tbaa !5
  call void @list_iterator_destroy(ptr noundef %391)
  br label %392

392:                                              ; preds = %390, %387
  store i32 0, ptr %12, align 4
  br label %393

393:                                              ; preds = %392, %384
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  %394 = load i32, ptr %12, align 4
  switch i32 %394, label %418 [
    i32 0, label %395
    i32 4, label %397
  ]

395:                                              ; preds = %393
  br label %396

396:                                              ; preds = %395, %336, %333
  br label %397

397:                                              ; preds = %396, %393, %330, %272, %136, %114
  %398 = load ptr, ptr %6, align 8, !tbaa !5
  %399 = icmp ne ptr null, %398
  br i1 %399, label %400, label %402

400:                                              ; preds = %397
  %401 = load ptr, ptr %6, align 8, !tbaa !5
  call void @clib_package_free(ptr noundef %401)
  br label %402

402:                                              ; preds = %400, %397
  %403 = load ptr, ptr %7, align 8, !tbaa !5
  %404 = icmp ne ptr null, %403
  br i1 %404, label %405, label %407

405:                                              ; preds = %402
  %406 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %406) #9
  br label %407

407:                                              ; preds = %405, %402
  %408 = load i32, ptr %8, align 4, !tbaa !9
  %409 = icmp eq i32 0, %408
  br i1 %409, label %410, label %416

410:                                              ; preds = %407
  %411 = load ptr, ptr %11, align 8, !tbaa !5
  %412 = icmp ne ptr null, %411
  br i1 %412, label %413, label %415

413:                                              ; preds = %410
  %414 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %414) #9
  br label %415

415:                                              ; preds = %413, %410
  br label %416

416:                                              ; preds = %415, %407
  %417 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %417, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %418

418:                                              ; preds = %416, %393, %330, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %419 = load i32, ptr %3, align 4
  ret i32 %419
}

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

declare ptr @path_join(ptr noundef, ptr noundef) #2

declare ptr @fs_read(ptr noundef) #2

declare ptr @clib_package_new(ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nounwind
declare ptr @realpath(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

declare i32 @hash_has(ptr noundef, ptr noundef) #2

declare i32 @fs_exists(ptr noundef) #2

declare void @debug(ptr noundef, ptr noundef, ...) #2

declare ptr @clib_package_new_from_slug(ptr noundef, i32 noundef) #2

declare void @hash_set(ptr noundef, ptr noundef, ptr noundef) #2

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

declare ptr @trim(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

declare ptr @str_flatten(ptr noundef, i32 noundef, i32 noundef) #2

declare i32 @asprintf(ptr noundef, ptr noundef, ...) #2

declare void @clib_package_set_opts(ptr noundef byval(%struct.clib_package_opts_t) align 8) #2

; Function Attrs: nounwind
declare i32 @setenv(ptr noundef, ptr noundef, i32 noundef) #5

declare i32 @cc_fprintf(i32 noundef, ptr noundef, ptr noundef, ...) #2

declare i32 @system(ptr noundef) #2

declare ptr @list_iterator_new(ptr noundef, i32 noundef) #2

declare ptr @list_iterator_next(ptr noundef) #2

declare void @clib_package_free(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @configure_package(ptr noundef) #0

declare void @list_iterator_destroy(ptr noundef) #2

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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 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 #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 20}
!16 = !{!"options", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!17 = !{!18, !6, i64 112}
!18 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !10, i64 152}
!19 = !{!18, !6, i64 104}
!20 = !{!16, !10, i64 32}
!21 = !{!18, !6, i64 24}
!22 = !{!23, !6, i64 16}
!23 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32}
!24 = !{!16, !6, i64 8}
!25 = !{!18, !6, i64 48}
!26 = !{!18, !6, i64 120}
!27 = !{!28, !6, i64 16}
!28 = !{!"list_node", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!30, !6, i64 8}
!30 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!30, !6, i64 0}
!32 = !{!30, !6, i64 16}
!33 = !{!16, !6, i64 0}
!34 = distinct !{!34, !14}
!35 = !{!16, !10, i64 24}
!36 = !{!18, !6, i64 128}
!37 = distinct !{!37, !14}


; 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.clib_package_opts_t = type { i32, i32, i32, ptr, i32, ptr }
%struct.debug_t = type { ptr, i32, i32, ptr }
%struct.options = type { ptr, ptr, i32, i32, i32, i32, i32, i32 }

@package_opts = external dso_local global %struct.clib_package_opts_t, align 8
@root_package = external dso_local local_unnamed_addr global ptr, align 8
@configured = external dso_local local_unnamed_addr global ptr, align 8
@debugger = external dso_local global %struct.debug_t, align 8
@rest_argv = external dso_local local_unnamed_addr global ptr, align 8
@rest_argc = external dso_local local_unnamed_addr global i32, align 4
@opts = external dso_local local_unnamed_addr global %struct.options, align 8
@manifest_names = external local_unnamed_addr global [0 x ptr], align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @configure_package_with_manifest_name(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = tail call ptr @path_join(ptr noundef %0, ptr noundef %1) #13
  %7 = icmp eq ptr %6, null
  br i1 %7, label %192, label %8

8:                                                ; preds = %2
  %9 = load ptr, ptr @root_package, align 8, !tbaa !5
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %.preheader.preheader, label %43

.preheader.preheader:                             ; preds = %8
  %.pre = load ptr, ptr @manifest_names, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %10 = phi ptr [ %15, %.preheader ], [ %.pre, %.preheader.preheader ]
  %.0109 = phi i32 [ %12, %.preheader ], [ 0, %.preheader.preheader ]
  %11 = tail call ptr @fs_read(ptr noundef %10) #13
  %12 = add i32 %.0109, 1
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds [0 x ptr], ptr @manifest_names, i64 0, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  %.not129 = icmp eq ptr %11, null
  %17 = select i1 %16, i1 %.not129, i1 false
  br i1 %17, label %.preheader, label %18, !llvm.loop !9

18:                                               ; preds = %.preheader
  br i1 %.not129, label %thread-pre-split, label %19

19:                                               ; preds = %18
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 20), align 4, !tbaa !11
  %21 = tail call ptr @clib_package_new(ptr noundef nonnull %11, i32 noundef %20) #13
  store ptr %21, ptr @root_package, align 8, !tbaa !5
  br label %22

thread-pre-split:                                 ; preds = %18
  %.pr = load ptr, ptr @root_package, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %thread-pre-split, %19
  %23 = phi ptr [ %.pr, %thread-pre-split ], [ %21, %19 ]
  %.not130 = icmp eq ptr %23, null
  br i1 %.not130, label %43, label %24

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %23, i64 112
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %.not131 = icmp eq ptr %26, null
  br i1 %.not131, label %43, label %27

27:                                               ; preds = %24
  %28 = tail call ptr @llvm.stacksave.p0()
  %29 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %29, i8 0, i64 4096, i1 false)
  %30 = load ptr, ptr @root_package, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 112
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = call ptr @realpath(ptr noundef %32, ptr noundef nonnull %29) #13
  %34 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %29) #14
  %35 = add i64 %34, 1
  %36 = load ptr, ptr @root_package, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 112
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  call void @free(ptr noundef %38) #13
  %39 = call noalias ptr @malloc(i64 noundef %35) #15
  %40 = load ptr, ptr @root_package, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 112
  store ptr %39, ptr %41, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 1 %39, i8 0, i64 %35, i1 false)
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %42, ptr nonnull align 16 %29, i64 %35, i1 false)
  call void @llvm.stackrestore.p0(ptr %28)
  br label %43

43:                                               ; preds = %22, %24, %27, %8
  %.098 = phi ptr [ null, %8 ], [ %11, %27 ], [ %11, %24 ], [ %11, %22 ]
  %44 = load ptr, ptr @configured, align 8, !tbaa !5
  %45 = call i32 @hash_has(ptr noundef %44, ptr noundef nonnull %6) #13
  %.not132 = icmp eq i32 %45, 0
  br i1 %.not132, label %46, label %.thread184

46:                                               ; preds = %43
  call void @free(ptr noundef %.098) #13
  %47 = call i32 @fs_exists(ptr noundef nonnull %6) #13
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %.thread

49:                                               ; preds = %46
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @debugger, ptr noundef nonnull @.str.1, ptr noundef nonnull %6) #13
  %50 = call ptr @fs_read(ptr noundef nonnull %6) #13
  %.not133 = icmp eq ptr %50, null
  br i1 %.not133, label %.thread, label %51

51:                                               ; preds = %49
  %52 = call ptr @clib_package_new(ptr noundef nonnull %50, i32 noundef 0) #13
  br label %54

.thread:                                          ; preds = %46, %49
  %53 = call ptr @clib_package_new_from_slug(ptr noundef %0, i32 noundef 0) #13
  br label %54

54:                                               ; preds = %.thread, %51
  %.199159 = phi ptr [ %50, %51 ], [ null, %.thread ]
  %.097 = phi ptr [ %52, %51 ], [ %53, %.thread ]
  %55 = icmp eq ptr %.097, null
  br i1 %55, label %.thread184, label %56

56:                                               ; preds = %54
  %57 = getelementptr inbounds i8, ptr %.097, i64 104
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = icmp ne ptr %58, null
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 32), align 8
  %61 = icmp ne i32 %60, 0
  %or.cond = select i1 %59, i1 %61, i1 false
  br i1 %or.cond, label %62, label %70

62:                                               ; preds = %56
  %63 = load ptr, ptr @configured, align 8, !tbaa !5
  call void @hash_set(ptr noundef %63, ptr noundef nonnull %6, ptr noundef nonnull @.str.2) #13
  %64 = load ptr, ptr @stdout, align 8, !tbaa !5
  %65 = load ptr, ptr %57, align 8, !tbaa !16
  %66 = call ptr @trim(ptr noundef %65) #13
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.3, ptr noundef %66) #13
  %68 = load ptr, ptr @stdout, align 8, !tbaa !5
  %69 = call i32 @fflush(ptr noundef %68)
  br label %.thread161

70:                                               ; preds = %56
  %71 = getelementptr inbounds i8, ptr %.097, i64 24
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %.not134 = icmp eq ptr %72, null
  br i1 %.not134, label %124, label %73

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #13
  store ptr null, ptr %3, align 8, !tbaa !5
  %74 = load i32, ptr @rest_argc, align 4, !tbaa !18
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %76, label %79

76:                                               ; preds = %73
  %77 = load ptr, ptr @rest_argv, align 8, !tbaa !5
  %78 = call ptr @str_flatten(ptr noundef %77, i32 noundef 0, i32 noundef %74) #13
  %.pre207 = load ptr, ptr %71, align 8, !tbaa !17
  br label %79

79:                                               ; preds = %73, %76
  %80 = phi ptr [ %.pre207, %76 ], [ %72, %73 ]
  %81 = phi ptr [ %78, %76 ], [ @.str.4, %73 ]
  %82 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.5, ptr noundef %0, ptr noundef %80, ptr noundef %81) #13
  %83 = load ptr, ptr @root_package, align 8, !tbaa !5
  %.not135 = icmp eq ptr %83, null
  br i1 %.not135, label %90, label %84

84:                                               ; preds = %79
  %85 = getelementptr inbounds i8, ptr %83, i64 112
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  %.not136 = icmp eq ptr %86, null
  br i1 %.not136, label %90, label %87

87:                                               ; preds = %84
  store ptr %86, ptr getelementptr inbounds (i8, ptr @package_opts, i64 16), align 8, !tbaa !19
  call void @clib_package_set_opts(ptr noundef nonnull byval(%struct.clib_package_opts_t) align 8 @package_opts) #13
  %88 = load ptr, ptr getelementptr inbounds (i8, ptr @package_opts, i64 16), align 8, !tbaa !19
  %89 = call i32 @setenv(ptr noundef nonnull @.str.6, ptr noundef %88, i32 noundef 1) #13
  br label %106

90:                                               ; preds = %84, %79
  %91 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !21
  %.not137 = icmp eq ptr %91, null
  br i1 %.not137, label %94, label %92

92:                                               ; preds = %90
  %93 = call i32 @setenv(ptr noundef nonnull @.str.6, ptr noundef nonnull %91, i32 noundef 1) #13
  br label %106

94:                                               ; preds = %90
  %95 = getelementptr inbounds i8, ptr %.097, i64 112
  %96 = load ptr, ptr %95, align 8, !tbaa !14
  %.not138 = icmp eq ptr %96, null
  br i1 %.not138, label %106, label %97

97:                                               ; preds = %94
  %98 = call ptr @llvm.stacksave.p0()
  %99 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %99, i8 0, i64 4096, i1 false)
  %100 = load ptr, ptr %95, align 8, !tbaa !14
  %101 = call ptr @realpath(ptr noundef %100, ptr noundef nonnull %99) #13
  %102 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %99) #14
  %103 = add i64 %102, 1
  %104 = load ptr, ptr %95, align 8, !tbaa !14
  call void @free(ptr noundef %104) #13
  %calloc = call ptr @calloc(i64 1, i64 %103)
  store ptr %calloc, ptr %95, align 8, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %calloc, ptr nonnull align 16 %99, i64 %103, i1 false)
  %105 = call i32 @setenv(ptr noundef nonnull @.str.6, ptr noundef %calloc, i32 noundef 1) #13
  call void @llvm.stackrestore.p0(ptr %98)
  br label %106

106:                                              ; preds = %92, %97, %94, %87
  %107 = load i32, ptr @rest_argc, align 4, !tbaa !18
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  call void @free(ptr noundef %81) #13
  br label %110

110:                                              ; preds = %109, %106
  %111 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 20), align 4, !tbaa !11
  %.not139 = icmp eq i32 %111, 0
  br i1 %.not139, label %126, label %112

112:                                              ; preds = %110
  %113 = load ptr, ptr @stdout, align 8, !tbaa !5
  %114 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 4, ptr noundef %113, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8) #13
  %115 = load ptr, ptr @stdout, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef nonnull @.str.9) #13
  %117 = load ptr, ptr @stdout, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %.097, i64 48
  %119 = load ptr, ptr %118, align 8, !tbaa !22
  %120 = load ptr, ptr %71, align 8, !tbaa !17
  %121 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %117, ptr noundef nonnull @.str.10, ptr noundef %119, ptr noundef %120) #13
  %122 = load ptr, ptr @stdout, align 8, !tbaa !5
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.11) #13
  br label %126

124:                                              ; preds = %70
  %125 = load ptr, ptr @configured, align 8, !tbaa !5
  call void @hash_set(ptr noundef %125, ptr noundef nonnull %6, ptr noundef nonnull @.str.13) #13
  br label %.thread161

126:                                              ; preds = %110, %112
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @debugger, ptr noundef nonnull @.str.12, ptr noundef %127) #13
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = call i32 @system(ptr noundef %128) #13
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %130) #13
  store ptr null, ptr %3, align 8, !tbaa !5
  %131 = load ptr, ptr @configured, align 8, !tbaa !5
  call void @hash_set(ptr noundef %131, ptr noundef nonnull %6, ptr noundef nonnull @.str.2) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #13
  %.not140 = icmp eq i32 %129, 0
  br i1 %.not140, label %.thread161, label %.thread193

.thread161:                                       ; preds = %124, %62, %126
  %132 = getelementptr inbounds i8, ptr %.097, i64 120
  %133 = load ptr, ptr %132, align 8, !tbaa !23
  %.not141 = icmp eq ptr %133, null
  br i1 %.not141, label %.thread169, label %134

134:                                              ; preds = %.thread161
  %135 = call ptr @list_iterator_new(ptr noundef nonnull %133, i32 noundef 0) #13
  br label %136

136:                                              ; preds = %155, %134
  %137 = call ptr @list_iterator_next(ptr noundef %135) #13
  %.not142 = icmp eq ptr %137, null
  br i1 %.not142, label %157, label %138

138:                                              ; preds = %136
  %139 = getelementptr inbounds i8, ptr %137, i64 16
  %140 = load ptr, ptr %139, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #13
  store ptr null, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i64 8
  %142 = load ptr, ptr %141, align 8, !tbaa !26
  %143 = load ptr, ptr %140, align 8, !tbaa !28
  %144 = getelementptr inbounds i8, ptr %140, i64 16
  %145 = load ptr, ptr %144, align 8, !tbaa !29
  %146 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.14, ptr noundef %142, ptr noundef %143, ptr noundef %145) #13
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = call ptr @clib_package_new_from_slug(ptr noundef %147, i32 noundef 0) #13
  %149 = load ptr, ptr @opts, align 8, !tbaa !30
  %150 = getelementptr inbounds i8, ptr %148, i64 48
  %151 = load ptr, ptr %150, align 8, !tbaa !22
  %152 = call ptr @path_join(ptr noundef %149, ptr noundef %151) #13
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %153) #13
  call void @clib_package_free(ptr noundef %148) #13
  %154 = icmp eq ptr %152, null
  br i1 %154, label %.thread172, label %155

.thread172:                                       ; preds = %138
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #13
  br label %.thread193

155:                                              ; preds = %138
  %156 = call i32 @configure_package(ptr noundef nonnull %152)
  call void @free(ptr noundef nonnull %152) #13
  %.not144 = icmp eq i32 %156, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #13
  br i1 %.not144, label %136, label %.thread193, !llvm.loop !31

157:                                              ; preds = %136
  %.not143 = icmp eq ptr %135, null
  br i1 %.not143, label %.thread169, label %158

158:                                              ; preds = %157
  call void @list_iterator_destroy(ptr noundef nonnull %135) #13
  br label %.thread169

.thread169:                                       ; preds = %157, %158, %.thread161
  %159 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 24), align 8, !tbaa !32
  %.not145 = icmp eq i32 %159, 0
  br i1 %.not145, label %.thread193, label %160

160:                                              ; preds = %.thread169
  %161 = getelementptr inbounds i8, ptr %.097, i64 128
  %162 = load ptr, ptr %161, align 8, !tbaa !33
  %.not146 = icmp eq ptr %162, null
  br i1 %.not146, label %.thread193, label %163

163:                                              ; preds = %160
  %164 = call ptr @list_iterator_new(ptr noundef nonnull %162, i32 noundef 0) #13
  br label %165

165:                                              ; preds = %184, %163
  %166 = call ptr @list_iterator_next(ptr noundef %164) #13
  %.not147 = icmp eq ptr %166, null
  br i1 %.not147, label %186, label %167

167:                                              ; preds = %165
  %168 = getelementptr inbounds i8, ptr %166, i64 16
  %169 = load ptr, ptr %168, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #13
  store ptr null, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds i8, ptr %169, i64 8
  %171 = load ptr, ptr %170, align 8, !tbaa !26
  %172 = load ptr, ptr %169, align 8, !tbaa !28
  %173 = getelementptr inbounds i8, ptr %169, i64 16
  %174 = load ptr, ptr %173, align 8, !tbaa !29
  %175 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.14, ptr noundef %171, ptr noundef %172, ptr noundef %174) #13
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = call ptr @clib_package_new_from_slug(ptr noundef %176, i32 noundef 0) #13
  %178 = load ptr, ptr @opts, align 8, !tbaa !30
  %179 = getelementptr inbounds i8, ptr %177, i64 48
  %180 = load ptr, ptr %179, align 8, !tbaa !22
  %181 = call ptr @path_join(ptr noundef %178, ptr noundef %180) #13
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %182) #13
  call void @clib_package_free(ptr noundef %177) #13
  %183 = icmp eq ptr %181, null
  br i1 %183, label %.thread175, label %184

.thread175:                                       ; preds = %167
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #13
  br label %.thread193

184:                                              ; preds = %167
  %185 = call i32 @configure_package(ptr noundef nonnull %181)
  call void @free(ptr noundef nonnull %181) #13
  %.not149 = icmp eq i32 %185, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #13
  br i1 %.not149, label %165, label %.thread193, !llvm.loop !34

186:                                              ; preds = %165
  %.not148 = icmp eq ptr %164, null
  br i1 %.not148, label %.thread193, label %187

187:                                              ; preds = %186
  call void @list_iterator_destroy(ptr noundef nonnull %164) #13
  br label %.thread193

.thread193:                                       ; preds = %155, %184, %.thread169, %.thread172, %187, %186, %.thread175, %160, %126
  %.8198 = phi i32 [ 0, %160 ], [ %129, %126 ], [ 0, %.thread169 ], [ -12, %.thread172 ], [ -12, %.thread175 ], [ 0, %186 ], [ 0, %187 ], [ %185, %184 ], [ %156, %155 ]
  call void @clib_package_free(ptr noundef nonnull %.097) #13
  br label %.thread184

.thread184:                                       ; preds = %54, %43, %.thread193
  %.2190 = phi ptr [ %.199159, %.thread193 ], [ %.199159, %54 ], [ %.098, %43 ]
  %188 = phi i1 [ false, %.thread193 ], [ true, %54 ], [ true, %43 ]
  %.8189 = phi i32 [ %.8198, %.thread193 ], [ -12, %54 ], [ 0, %43 ]
  %.not151 = icmp eq ptr %.2190, null
  br i1 %.not151, label %190, label %189

189:                                              ; preds = %.thread184
  call void @free(ptr noundef nonnull %.2190) #13
  br label %190

190:                                              ; preds = %189, %.thread184
  br i1 %188, label %191, label %192

191:                                              ; preds = %190
  call void @free(ptr noundef %6) #13
  br label %192

192:                                              ; preds = %190, %191, %2
  %.0 = phi i32 [ -12, %2 ], [ %.8189, %191 ], [ %.8189, %190 ]
  ret i32 %.0
}

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

declare ptr @path_join(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @fs_read(ptr noundef) local_unnamed_addr #2

declare ptr @clib_package_new(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #9

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

declare i32 @hash_has(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @fs_exists(ptr noundef) local_unnamed_addr #2

declare void @debug(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @clib_package_new_from_slug(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @hash_set(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare ptr @trim(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #5

declare ptr @str_flatten(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @asprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare void @clib_package_set_opts(ptr noundef byval(%struct.clib_package_opts_t) align 8) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @setenv(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #10

declare i32 @cc_fprintf(i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #11

declare ptr @list_iterator_new(ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @list_iterator_next(ptr noundef) local_unnamed_addr #2

declare void @clib_package_free(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @configure_package(ptr noundef) local_unnamed_addr #0

declare void @list_iterator_destroy(ptr noundef) local_unnamed_addr #2

; 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 #12

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 = { "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 nocallback nofree nosync nounwind willreturn }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #7 = { mustprogress nounwind willreturn allockind("free") 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 #8 = { 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 #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { 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 #11 = { nofree "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 #12 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #13 = { nounwind }
attributes #14 = { nounwind willreturn memory(read) }
attributes #15 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 20}
!12 = !{!"options", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 112}
!15 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !13, i64 152}
!16 = !{!15, !6, i64 104}
!17 = !{!15, !6, i64 24}
!18 = !{!13, !13, i64 0}
!19 = !{!20, !6, i64 16}
!20 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !13, i64 24, !6, i64 32}
!21 = !{!12, !6, i64 8}
!22 = !{!15, !6, i64 48}
!23 = !{!15, !6, i64 120}
!24 = !{!25, !6, i64 16}
!25 = !{!"list_node", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!27, !6, i64 8}
!27 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!27, !6, i64 0}
!29 = !{!27, !6, i64 16}
!30 = !{!12, !6, i64 0}
!31 = distinct !{!31, !10}
!32 = !{!12, !13, i64 24}
!33 = !{!15, !6, i64 128}
!34 = distinct !{!34, !10}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass