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

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

@opts = external hidden global %struct.clib_package_opts_t, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [6 x i8], align 1
@_debugger = external dso_local global %struct.debug_t, align 8
@.str.24 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [13 x i8], align 1
@clib_package_curl_share = external dso_local global ptr, align 8
@.str.51 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

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

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

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

declare i32 @debug_init(ptr noundef, ptr noundef) #1

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

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

34:                                               ; preds = %3
  %35 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %36

36:                                               ; preds = %34, %3
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.clib_package_t, ptr %37, i32 0, i32 7
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.45, ptr noundef %39)
  %40 = call ptr @gettempdir()
  store ptr %40, ptr %16, align 8, !tbaa !5
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  %42 = icmp eq ptr null, %41
  br i1 %42, label %43, label %57

43:                                               ; preds = %36
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %56

46:                                               ; preds = %43
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %47, ptr noundef @.str, ptr noundef @.str.1)
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.2) #7
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %51, ptr noundef @.str.46)
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str.4) #7
  store i32 %54, ptr %20, align 4, !tbaa !9
  %55 = load i32, ptr %20, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %46, %43
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %339

57:                                               ; preds = %36
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.clib_package_t, ptr %58, i32 0, i32 7
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = icmp ne ptr %60, null
  br i1 %61, label %76, label %62

62:                                               ; preds = %57
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %75

65:                                               ; preds = %62
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %66, ptr noundef @.str, ptr noundef @.str.1)
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.2) #7
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %70, ptr noundef @.str.47)
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.4) #7
  store i32 %73, ptr %22, align 4, !tbaa !9
  %74 = load i32, ptr %22, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %65, %62
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %339

76:                                               ; preds = %57
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.clib_package_t, ptr %77, i32 0, i32 7
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  %80 = call ptr @strrchr(ptr noundef %79, i32 noundef 47) #8
  store ptr %80, ptr %17, align 8, !tbaa !5
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %91

83:                                               ; preds = %76
  %84 = load ptr, ptr %17, align 8, !tbaa !5
  %85 = load i8, ptr %84, align 1, !tbaa !17
  %86 = sext i8 %85 to i32
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %91

88:                                               ; preds = %83
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %17, align 8, !tbaa !5
  br label %105

91:                                               ; preds = %83, %76
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %104

94:                                               ; preds = %91
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %95, ptr noundef @.str, ptr noundef @.str.1)
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.2) #7
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %99, ptr noundef @.str.48)
  %101 = load ptr, ptr @stderr, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.4) #7
  store i32 %102, ptr %23, align 4, !tbaa !9
  %103 = load i32, ptr %23, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %94, %91
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %339

105:                                              ; preds = %88
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.clib_package_t, ptr %106, i32 0, i32 7
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.clib_package_t, ptr %109, i32 0, i32 10
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %10, ptr noundef @.str.49, ptr noundef %108, ptr noundef %111)
  store i32 %112, ptr %9, align 4, !tbaa !9
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = icmp eq i32 -1, %113
  br i1 %114, label %115, label %116

115:                                              ; preds = %105
  br label %332

116:                                              ; preds = %105
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.clib_package_t, ptr %118, i32 0, i32 10
  %120 = load ptr, ptr %119, align 8, !tbaa !18
  %121 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %11, ptr noundef @.str.50, ptr noundef %117, ptr noundef %120)
  store i32 %121, ptr %9, align 4, !tbaa !9
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = icmp eq i32 -1, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %116
  br label %332

125:                                              ; preds = %116
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %12, ptr noundef @.str.23, ptr noundef %126, ptr noundef %127)
  store i32 %128, ptr %9, align 4, !tbaa !9
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = icmp eq i32 -1, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %125
  br label %332

132:                                              ; preds = %125
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = load ptr, ptr @clib_package_curl_share, align 8, !tbaa !5
  %136 = call i32 @http_get_file_shared(ptr noundef %133, ptr noundef %134, ptr noundef %135)
  store i32 %136, ptr %9, align 4, !tbaa !9
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = icmp ne i32 0, %137
  br i1 %138, label %139, label %160

139:                                              ; preds = %132
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %159

142:                                              ; preds = %139
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %143, ptr noundef @.str, ptr noundef @.str.1)
  %145 = load ptr, ptr @stderr, align 8, !tbaa !5
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.2) #7
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.clib_package_t, ptr %148, i32 0, i32 7
  %150 = load ptr, ptr %149, align 8, !tbaa !15
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.clib_package_t, ptr %151, i32 0, i32 10
  %153 = load ptr, ptr %152, align 8, !tbaa !18
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %147, ptr noundef @.str.51, ptr noundef %150, ptr noundef %153, ptr noundef %154)
  %156 = load ptr, ptr @stderr, align 8, !tbaa !5
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.4) #7
  store i32 %157, ptr %24, align 4, !tbaa !9
  %158 = load i32, ptr %24, align 4, !tbaa !9
  br label %159

159:                                              ; preds = %142, %139
  br label %332

160:                                              ; preds = %132
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %13, ptr noundef @.str.52, ptr noundef %161, ptr noundef %162)
  store i32 %163, ptr %9, align 4, !tbaa !9
  %164 = load i32, ptr %9, align 4, !tbaa !9
  %165 = icmp eq i32 -1, %164
  br i1 %165, label %166, label %167

166:                                              ; preds = %160
  br label %332

167:                                              ; preds = %160
  %168 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %169 = icmp ne ptr %168, null
  br i1 %169, label %172, label %170

170:                                              ; preds = %167
  %171 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %172

172:                                              ; preds = %170, %167
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.53, ptr noundef %173)
  %174 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %175 = icmp ne ptr %174, null
  br i1 %175, label %178, label %176

176:                                              ; preds = %172
  %177 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %178

178:                                              ; preds = %176, %172
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.32, ptr noundef %179)
  %180 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %181 = icmp ne ptr %180, null
  br i1 %181, label %184, label %182

182:                                              ; preds = %178
  %183 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %184

184:                                              ; preds = %182, %178
  %185 = load ptr, ptr %12, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.54, ptr noundef %185)
  %186 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %187 = icmp ne ptr %186, null
  br i1 %187, label %190, label %188

188:                                              ; preds = %184
  %189 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %190

190:                                              ; preds = %188, %184
  %191 = load ptr, ptr %13, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.55, ptr noundef %191)
  %192 = load ptr, ptr %13, align 8, !tbaa !5
  %193 = call i32 @system(ptr noundef %192)
  store i32 %193, ptr %9, align 4, !tbaa !9
  %194 = load i32, ptr %9, align 4, !tbaa !9
  %195 = icmp ne i32 0, %194
  br i1 %195, label %196, label %197

196:                                              ; preds = %190
  br label %332

197:                                              ; preds = %190
  %198 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %198) #7
  store ptr null, ptr %13, align 8, !tbaa !5
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = load i64, ptr %8, align 8, !tbaa !11
  call void @set_prefix(ptr noundef %199, i64 noundef %200)
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.clib_package_t, ptr %201, i32 0, i32 3
  %203 = load ptr, ptr %202, align 8, !tbaa !19
  store ptr %203, ptr %25, align 8, !tbaa !5
  %204 = load ptr, ptr %25, align 8, !tbaa !5
  %205 = icmp eq ptr null, %204
  br i1 %205, label %206, label %207

206:                                              ; preds = %197
  store ptr @.str.56, ptr %25, align 8, !tbaa !5
  br label %207

207:                                              ; preds = %206, %197
  %208 = load i64, ptr %8, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %31, i8 0, i64 %208, i1 false)
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = call ptr @realpath(ptr noundef %209, ptr noundef %31) #7
  %211 = load ptr, ptr %5, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.clib_package_t, ptr %211, i32 0, i32 10
  %213 = load ptr, ptr %212, align 8, !tbaa !18
  store ptr %213, ptr %26, align 8, !tbaa !5
  %214 = load ptr, ptr %26, align 8, !tbaa !5
  %215 = getelementptr inbounds i8, ptr %214, i64 0
  %216 = load i8, ptr %215, align 1, !tbaa !17
  %217 = sext i8 %216 to i32
  %218 = icmp eq i32 118, %217
  br i1 %218, label %219, label %222

219:                                              ; preds = %207
  %220 = load ptr, ptr %26, align 8, !tbaa !5
  %221 = getelementptr inbounds i8, ptr %220, i32 1
  store ptr %221, ptr %26, align 8, !tbaa !5
  br label %222

222:                                              ; preds = %219, %207
  %223 = load ptr, ptr %16, align 8, !tbaa !5
  %224 = load ptr, ptr %17, align 8, !tbaa !5
  %225 = load ptr, ptr %26, align 8, !tbaa !5
  %226 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %14, ptr noundef @.str.57, ptr noundef %223, ptr noundef %224, ptr noundef %225)
  store i32 %226, ptr %9, align 4, !tbaa !9
  %227 = load i32, ptr %9, align 4, !tbaa !9
  %228 = icmp eq i32 -1, %227
  br i1 %228, label %229, label %230

229:                                              ; preds = %222
  br label %332

230:                                              ; preds = %222
  %231 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %232 = icmp ne ptr %231, null
  br i1 %232, label %235, label %233

233:                                              ; preds = %230
  %234 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %235

235:                                              ; preds = %233, %230
  %236 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.58, ptr noundef %236)
  %237 = load ptr, ptr %5, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.clib_package_t, ptr %237, i32 0, i32 15
  %239 = load ptr, ptr %238, align 8, !tbaa !20
  %240 = icmp ne ptr %239, null
  br i1 %240, label %241, label %262

241:                                              ; preds = %235
  %242 = load ptr, ptr %14, align 8, !tbaa !5
  %243 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %15, ptr noundef @.str.59, ptr noundef %242)
  store i32 %243, ptr %9, align 4, !tbaa !9
  %244 = load i32, ptr %9, align 4, !tbaa !9
  %245 = icmp eq i32 -1, %244
  br i1 %245, label %246, label %247

246:                                              ; preds = %241
  br label %332

247:                                              ; preds = %241
  %248 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %249 = icmp ne ptr %248, null
  br i1 %249, label %252, label %250

250:                                              ; preds = %247
  %251 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %252

252:                                              ; preds = %250, %247
  %253 = load ptr, ptr %15, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.60, ptr noundef %253)
  %254 = load ptr, ptr %5, align 8, !tbaa !5
  %255 = load ptr, ptr %15, align 8, !tbaa !5
  %256 = load i32, ptr %7, align 4, !tbaa !9
  %257 = call i32 @clib_package_install_dependencies(ptr noundef %254, ptr noundef %255, i32 noundef %256)
  store i32 %257, ptr %9, align 4, !tbaa !9
  %258 = load i32, ptr %9, align 4, !tbaa !9
  %259 = icmp eq i32 -1, %258
  br i1 %259, label %260, label %261

260:                                              ; preds = %252
  br label %332

261:                                              ; preds = %252
  br label %262

262:                                              ; preds = %261, %235
  %263 = load i32, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @opts, i32 0, i32 2), align 8, !tbaa !21
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %291, label %265

265:                                              ; preds = %262
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.clib_package_t, ptr %266, i32 0, i32 11
  %268 = load ptr, ptr %267, align 8, !tbaa !23
  %269 = icmp ne ptr %268, null
  br i1 %269, label %270, label %291

270:                                              ; preds = %265
  %271 = load ptr, ptr %5, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.clib_package_t, ptr %271, i32 0, i32 6
  %273 = load ptr, ptr %272, align 8, !tbaa !24
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.clib_package_t, ptr %274, i32 0, i32 11
  %276 = load ptr, ptr %275, align 8, !tbaa !23
  %277 = call ptr @__xpg_basename(ptr noundef %276) #7
  %278 = load ptr, ptr %14, align 8, !tbaa !5
  %279 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %13, ptr noundef @.str.61, ptr noundef %31, ptr noundef %273, ptr noundef %277, ptr noundef %278)
  store i32 %279, ptr %9, align 4, !tbaa !9
  %280 = load i32, ptr %9, align 4, !tbaa !9
  %281 = icmp eq i32 -1, %280
  br i1 %281, label %282, label %283

282:                                              ; preds = %270
  br label %332

283:                                              ; preds = %270
  %284 = load ptr, ptr %13, align 8, !tbaa !5
  %285 = call i32 @system(ptr noundef %284)
  store i32 %285, ptr %9, align 4, !tbaa !9
  %286 = load i32, ptr %9, align 4, !tbaa !9
  %287 = icmp ne i32 0, %286
  br i1 %287, label %288, label %289

288:                                              ; preds = %283
  br label %332

289:                                              ; preds = %283
  %290 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %290) #7
  br label %291

291:                                              ; preds = %289, %265, %262
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.clib_package_t, ptr %292, i32 0, i32 13
  %294 = load ptr, ptr %293, align 8, !tbaa !25
  %295 = icmp ne ptr %294, null
  br i1 %295, label %296, label %314

296:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store ptr null, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %297 = call ptr @getenv(ptr noundef @.str.62) #7
  store ptr %297, ptr %28, align 8, !tbaa !5
  %298 = load ptr, ptr %28, align 8, !tbaa !5
  %299 = icmp ne ptr %298, null
  br i1 %299, label %300, label %306

300:                                              ; preds = %296
  %301 = load ptr, ptr %28, align 8, !tbaa !5
  %302 = load ptr, ptr %5, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.clib_package_t, ptr %302, i32 0, i32 13
  %304 = load ptr, ptr %303, align 8, !tbaa !25
  %305 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %27, ptr noundef @.str.22, ptr noundef %301, ptr noundef %304)
  br label %311

306:                                              ; preds = %296
  %307 = load ptr, ptr %5, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.clib_package_t, ptr %307, i32 0, i32 13
  %309 = load ptr, ptr %308, align 8, !tbaa !25
  %310 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %27, ptr noundef @.str.63, ptr noundef %309)
  br label %311

311:                                              ; preds = %306, %300
  %312 = load ptr, ptr %28, align 8, !tbaa !5
  %313 = call i32 @setenv(ptr noundef @.str.62, ptr noundef %312, i32 noundef 1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %314

314:                                              ; preds = %311, %291
  %315 = load ptr, ptr %14, align 8, !tbaa !5
  %316 = load ptr, ptr %5, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.clib_package_t, ptr %316, i32 0, i32 2
  %318 = load ptr, ptr %317, align 8, !tbaa !26
  %319 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %13, ptr noundef @.str.64, ptr noundef %315, ptr noundef %318)
  store i32 %319, ptr %9, align 4, !tbaa !9
  %320 = load i32, ptr %9, align 4, !tbaa !9
  %321 = icmp eq i32 -1, %320
  br i1 %321, label %322, label %323

322:                                              ; preds = %314
  br label %332

323:                                              ; preds = %314
  %324 = load ptr, ptr @_debugger, align 8, !tbaa !13
  %325 = icmp ne ptr %324, null
  br i1 %325, label %328, label %326

326:                                              ; preds = %323
  %327 = call i32 @debug_init(ptr noundef @_debugger, ptr noundef @.str.24)
  br label %328

328:                                              ; preds = %326, %323
  %329 = load ptr, ptr %13, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef @_debugger, ptr noundef @.str.65, ptr noundef %329)
  %330 = load ptr, ptr %13, align 8, !tbaa !5
  %331 = call i32 @system(ptr noundef %330)
  store i32 %331, ptr %9, align 4, !tbaa !9
  br label %332

332:                                              ; preds = %328, %322, %288, %282, %260, %246, %229, %196, %166, %159, %131, %124, %115
  %333 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %333) #7
  %334 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %334) #7
  %335 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %335) #7
  %336 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %336) #7
  %337 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %337) #7
  %338 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %338, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %339

339:                                              ; preds = %332, %104, %75, %56
  %340 = load ptr, ptr %18, align 8
  call void @llvm.stackrestore.p0(ptr %340)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %341 = load i32, ptr %4, align 4
  ret i32 %341
}

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

declare ptr @gettempdir() #1

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

declare i32 @http_get_file_shared(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @system(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @set_prefix(ptr noundef, i64 noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @clib_package_install_dependencies(ptr noundef, ptr noundef, i32 noundef) #4

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { nocallback nofree nosync nounwind willreturn }
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 }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!15 = !{!16, !6, i64 56}
!16 = !{!"", !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}
!17 = !{!7, !7, i64 0}
!18 = !{!16, !6, i64 80}
!19 = !{!16, !6, i64 24}
!20 = !{!16, !6, i64 120}
!21 = !{!22, !10, i64 8}
!22 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32}
!23 = !{!16, !6, i64 88}
!24 = !{!16, !6, i64 48}
!25 = !{!16, !6, i64 104}
!26 = !{!16, !6, i64 16}


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

%struct.clib_package_opts_t = type { i32, i32, i32, ptr, i32, ptr }
%struct.debug_t = type { ptr, i32, i32, ptr }

@opts = external hidden local_unnamed_addr global %struct.clib_package_opts_t, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [6 x i8], align 1
@_debugger = external dso_local global %struct.debug_t, align 8
@.str.24 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [13 x i8], align 1
@clib_package_curl_share = external dso_local local_unnamed_addr global ptr, align 8
@.str.51 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

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

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

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

declare i32 @debug_init(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @clib_package_install_executable(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #11
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #11
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #11
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #11
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #11
  store ptr null, ptr %9, align 8, !tbaa !5
  %11 = tail call ptr @llvm.stacksave.p0()
  %12 = alloca [4096 x i8], align 16
  %13 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %14, label %16

14:                                               ; preds = %3
  %15 = tail call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %16

16:                                               ; preds = %14, %3
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  tail call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.45, ptr noundef %18) #11
  %19 = tail call ptr @gettempdir() #11
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %31

21:                                               ; preds = %16
  %.not104 = icmp eq i32 %2, 0
  br i1 %.not104, label %192, label %22

22:                                               ; preds = %21
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = tail call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %23, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1) #11
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.2) #12
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = tail call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %27, ptr noundef nonnull @.str.46) #11
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.4) #12
  br label %192

31:                                               ; preds = %16
  %32 = load ptr, ptr %17, align 8, !tbaa !12
  %.not83 = icmp eq ptr %32, null
  br i1 %.not83, label %33, label %43

33:                                               ; preds = %31
  %.not84 = icmp eq i32 %2, 0
  br i1 %.not84, label %192, label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = tail call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %35, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1) #11
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.2) #12
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = tail call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %39, ptr noundef nonnull @.str.47) #11
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.4) #12
  br label %192

43:                                               ; preds = %31
  %44 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %32, i32 noundef 47) #13
  %.not85 = icmp eq ptr %44, null
  br i1 %.not85, label %53, label %45

45:                                               ; preds = %43
  %46 = load i8, ptr %44, align 1, !tbaa !14
  %.not86 = icmp eq i8 %46, 0
  br i1 %.not86, label %53, label %47

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %44, i64 1
  %49 = getelementptr inbounds i8, ptr %0, i64 80
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.49, ptr noundef nonnull %32, ptr noundef %50) #11
  %52 = icmp eq i32 %51, -1
  br i1 %52, label %187, label %63

53:                                               ; preds = %45, %43
  %.not87 = icmp eq i32 %2, 0
  br i1 %.not87, label %192, label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = tail call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %55, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1) #11
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.2) #12
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = tail call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %59, ptr noundef nonnull @.str.48) #11
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.4) #12
  br label %192

63:                                               ; preds = %47
  %64 = load ptr, ptr %49, align 8, !tbaa !15
  %65 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.50, ptr noundef nonnull %48, ptr noundef %64) #11
  %66 = icmp eq i32 %65, -1
  br i1 %66, label %187, label %67

67:                                               ; preds = %63
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.23, ptr noundef nonnull %19, ptr noundef %68) #11
  %70 = icmp eq i32 %69, -1
  br i1 %70, label %187, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = load ptr, ptr @clib_package_curl_share, align 8, !tbaa !5
  %75 = call i32 @http_get_file_shared(ptr noundef %72, ptr noundef %73, ptr noundef %74) #11
  %.not88 = icmp eq i32 %75, 0
  br i1 %.not88, label %89, label %76

76:                                               ; preds = %71
  %.not103 = icmp eq i32 %2, 0
  br i1 %.not103, label %187, label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr @stderr, align 8, !tbaa !5
  %79 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %78, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1) #11
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.2) #12
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = load ptr, ptr %17, align 8, !tbaa !12
  %84 = load ptr, ptr %49, align 8, !tbaa !15
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %82, ptr noundef nonnull @.str.51, ptr noundef %83, ptr noundef %84, ptr noundef %85) #11
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.4) #12
  br label %187

89:                                               ; preds = %71
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.52, ptr noundef nonnull %19, ptr noundef %90) #11
  %92 = icmp eq i32 %91, -1
  br i1 %92, label %187, label %93

93:                                               ; preds = %89
  %94 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not89 = icmp eq ptr %94, null
  br i1 %.not89, label %95, label %97

95:                                               ; preds = %93
  %96 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %97

97:                                               ; preds = %95, %93
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.53, ptr noundef %98) #11
  %99 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not90 = icmp eq ptr %99, null
  br i1 %.not90, label %100, label %102

100:                                              ; preds = %97
  %101 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %102

102:                                              ; preds = %100, %97
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.32, ptr noundef %103) #11
  %104 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not91 = icmp eq ptr %104, null
  br i1 %.not91, label %105, label %107

105:                                              ; preds = %102
  %106 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %107

107:                                              ; preds = %105, %102
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.54, ptr noundef %108) #11
  %109 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not92 = icmp eq ptr %109, null
  br i1 %.not92, label %110, label %112

110:                                              ; preds = %107
  %111 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %112

112:                                              ; preds = %110, %107
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.55, ptr noundef %113) #11
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = call i32 @system(ptr noundef %114) #11
  %.not93 = icmp eq i32 %115, 0
  br i1 %.not93, label %116, label %187

116:                                              ; preds = %112
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %117) #11
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @set_prefix(ptr noundef nonnull %0, i64 noundef 4096)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %12, i8 0, i64 4096, i1 false)
  %118 = call ptr @realpath(ptr noundef %1, ptr noundef nonnull %12) #11
  %119 = load ptr, ptr %49, align 8, !tbaa !15
  %120 = load i8, ptr %119, align 1, !tbaa !14
  %121 = icmp eq i8 %120, 118
  %spec.select.idx = zext i1 %121 to i64
  %spec.select = getelementptr inbounds i8, ptr %119, i64 %spec.select.idx
  %122 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str.57, ptr noundef nonnull %19, ptr noundef nonnull %48, ptr noundef nonnull %spec.select) #11
  %123 = icmp eq i32 %122, -1
  br i1 %123, label %187, label %124

124:                                              ; preds = %116
  %125 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not94 = icmp eq ptr %125, null
  br i1 %.not94, label %126, label %128

126:                                              ; preds = %124
  %127 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %128

128:                                              ; preds = %126, %124
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.58, ptr noundef %129) #11
  %130 = getelementptr inbounds i8, ptr %0, i64 120
  %131 = load ptr, ptr %130, align 8, !tbaa !16
  %.not95 = icmp eq ptr %131, null
  br i1 %.not95, label %145, label %132

132:                                              ; preds = %128
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str.59, ptr noundef %133) #11
  %135 = icmp eq i32 %134, -1
  br i1 %135, label %187, label %136

136:                                              ; preds = %132
  %137 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not96 = icmp eq ptr %137, null
  br i1 %.not96, label %138, label %140

138:                                              ; preds = %136
  %139 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %140

140:                                              ; preds = %138, %136
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.60, ptr noundef %141) #11
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = call i32 @clib_package_install_dependencies(ptr noundef nonnull %0, ptr noundef %142, i32 noundef %2)
  %144 = icmp eq i32 %143, -1
  br i1 %144, label %187, label %145

145:                                              ; preds = %140, %128
  %146 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !17
  %.not97 = icmp eq i32 %146, 0
  br i1 %.not97, label %147, label %162

147:                                              ; preds = %145
  %148 = getelementptr inbounds i8, ptr %0, i64 88
  %149 = load ptr, ptr %148, align 8, !tbaa !19
  %.not98 = icmp eq ptr %149, null
  br i1 %.not98, label %162, label %150

150:                                              ; preds = %147
  %151 = getelementptr inbounds i8, ptr %0, i64 48
  %152 = load ptr, ptr %151, align 8, !tbaa !20
  %153 = call ptr @__xpg_basename(ptr noundef nonnull %149) #11
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.61, ptr noundef nonnull %12, ptr noundef %152, ptr noundef %153, ptr noundef %154) #11
  %156 = icmp eq i32 %155, -1
  br i1 %156, label %187, label %157

157:                                              ; preds = %150
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = call i32 @system(ptr noundef %158) #11
  %.not99 = icmp eq i32 %159, 0
  br i1 %.not99, label %160, label %187

160:                                              ; preds = %157
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %161) #11
  br label %162

162:                                              ; preds = %160, %147, %145
  %163 = getelementptr inbounds i8, ptr %0, i64 104
  %164 = load ptr, ptr %163, align 8, !tbaa !21
  %.not100 = icmp eq ptr %164, null
  br i1 %.not100, label %173, label %165

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #11
  store ptr null, ptr %10, align 8, !tbaa !5
  %166 = call ptr @getenv(ptr noundef nonnull @.str.62) #11
  %.not101 = icmp eq ptr %166, null
  br i1 %.not101, label %169, label %167

167:                                              ; preds = %165
  %168 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.22, ptr noundef nonnull %166, ptr noundef nonnull %164) #11
  br label %171

169:                                              ; preds = %165
  %170 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.63, ptr noundef nonnull %164) #11
  br label %171

171:                                              ; preds = %169, %167
  %172 = call i32 @setenv(ptr noundef nonnull @.str.62, ptr noundef %166, i32 noundef 1) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #11
  br label %173

173:                                              ; preds = %171, %162
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds i8, ptr %0, i64 16
  %176 = load ptr, ptr %175, align 8, !tbaa !22
  %177 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.64, ptr noundef %174, ptr noundef %176) #11
  %178 = icmp eq i32 %177, -1
  br i1 %178, label %187, label %179

179:                                              ; preds = %173
  %180 = load ptr, ptr @_debugger, align 8, !tbaa !9
  %.not102 = icmp eq ptr %180, null
  br i1 %.not102, label %181, label %183

181:                                              ; preds = %179
  %182 = call i32 @debug_init(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.24) #11
  br label %183

183:                                              ; preds = %181, %179
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ...) @debug(ptr noundef nonnull @_debugger, ptr noundef nonnull @.str.65, ptr noundef %184) #11
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = call i32 @system(ptr noundef %185) #11
  br label %187

187:                                              ; preds = %173, %157, %150, %140, %132, %116, %112, %89, %76, %77, %67, %63, %47, %183
  %.065 = phi i32 [ -1, %47 ], [ -1, %63 ], [ -1, %67 ], [ %75, %77 ], [ %75, %76 ], [ -1, %89 ], [ %115, %112 ], [ -1, %116 ], [ -1, %132 ], [ -1, %140 ], [ -1, %173 ], [ %186, %183 ], [ -1, %150 ], [ %159, %157 ]
  call void @free(ptr noundef nonnull %19) #11
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %188) #11
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %189) #11
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %190) #11
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %191) #11
  br label %192

192:                                              ; preds = %53, %54, %33, %34, %21, %22, %187
  %.0 = phi i32 [ %.065, %187 ], [ -1, %22 ], [ -1, %21 ], [ -1, %34 ], [ -1, %33 ], [ -1, %54 ], [ -1, %53 ]
  call void @llvm.stackrestore.p0(ptr %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  ret i32 %.0
}

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

declare ptr @gettempdir() local_unnamed_addr #1

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

declare i32 @http_get_file_shared(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare hidden void @set_prefix(ptr noundef, i64 noundef) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @clib_package_install_dependencies(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare ptr @__xpg_basename(ptr noundef) local_unnamed_addr #9

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #10

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #7 = { 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 #8 = { 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 #9 = { 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 #10 = { nofree nounwind 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 #11 = { nounwind }
attributes #12 = { cold nounwind }
attributes #13 = { nounwind willreturn memory(read) }

!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, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 56}
!13 = !{!"", !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, !11, i64 152}
!14 = !{!7, !7, i64 0}
!15 = !{!13, !6, i64 80}
!16 = !{!13, !6, i64 120}
!17 = !{!18, !11, i64 8}
!18 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !11, i64 24, !6, i64 32}
!19 = !{!13, !6, i64 88}
!20 = !{!13, !6, i64 48}
!21 = !{!13, !6, i64 104}
!22 = !{!13, !6, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass