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

; 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.command = type { ptr, ptr, ptr, ptr, ptr, i32, [32 x %struct.command_option_t], i32, [32 x ptr], ptr }
%struct.command_option_t = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.debug_t = type { ptr, i32, i32, ptr }
%struct.options = type { ptr, ptr, i32, i32, i32, i32, i32, ptr, 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 }
%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%struct.kh_ptr_t = type { i32, i32, i32, i32, 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
@program = external dso_local global %struct.command, align 8
@debugger = external dso_local global %struct.debug_t, align 8
@built = external dso_local global ptr, align 8
@rest_argv = external dso_local global ptr, align 8
@rest_offset = external dso_local global i32, align 4
@rest_argc = external dso_local global i32, align 4
@opts = external dso_local global %struct.options, align 8
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@stdout = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@manifest_names = external global [0 x ptr], align 8
@.str.22 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [28 x i8], align 1
@stderr = external global ptr, align 8
@.str.53 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [19 x i8], align 1

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

; 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

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: 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 @cc_fprintf(i32 noundef, ptr noundef, ptr noundef, ...) #2

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

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

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

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

47:                                               ; preds = %2
  %48 = call ptr @__errno_location() #12
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sub nsw i32 0, %49
  store i32 %50, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %499

51:                                               ; preds = %2
  %52 = call ptr @kh_init_ptr()
  store ptr %52, ptr @built, align 8, !tbaa !9
  %53 = load ptr, ptr @built, align 8, !tbaa !9
  %54 = call noalias ptr @strdup(ptr noundef @.str.22) #11
  call void @hash_set(ptr noundef %53, ptr noundef %54, ptr noundef @.str.23)
  call void @command_init(ptr noundef @program, ptr noundef @.str.24, ptr noundef @.str.23)
  %55 = call i32 @debug_init(ptr noundef @debugger, ptr noundef @.str.24)
  store ptr @.str.25, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 1), align 8, !tbaa !13
  call void @command_option(ptr noundef @program, ptr noundef @.str.26, ptr noundef @.str.27, ptr noundef @.str.28, ptr noundef @setopt_dir)
  call void @command_option(ptr noundef @program, ptr noundef @.str.29, ptr noundef @.str.30, ptr noundef @.str.31, ptr noundef @setopt_prefix)
  call void @command_option(ptr noundef @program, ptr noundef @.str.32, ptr noundef @.str.33, ptr noundef @.str.34, ptr noundef @setopt_quiet)
  call void @command_option(ptr noundef @program, ptr noundef @.str.35, ptr noundef @.str.36, ptr noundef @.str.37, ptr noundef @setopt_global)
  call void @command_option(ptr noundef @program, ptr noundef @.str.38, ptr noundef @.str.39, ptr noundef @.str.40, ptr noundef @setopt_clean)
  call void @command_option(ptr noundef @program, ptr noundef @.str.41, ptr noundef @.str.42, ptr noundef @.str.43, ptr noundef @setopt_test)
  call void @command_option(ptr noundef @program, ptr noundef @.str.44, ptr noundef @.str.45, ptr noundef @.str.46, ptr noundef @setopt_dev)
  call void @command_option(ptr noundef @program, ptr noundef @.str.47, ptr noundef @.str.48, ptr noundef @.str.49, ptr noundef @setopt_force)
  call void @command_option(ptr noundef @program, ptr noundef @.str.50, ptr noundef @.str.51, ptr noundef @.str.52, ptr noundef @setopt_skip_cache)
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  call void @command_parse(ptr noundef @program, i32 noundef %56, ptr noundef %57)
  %58 = load ptr, ptr @opts, align 8, !tbaa !15
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %76

60:                                               ; preds = %51
  %61 = load i64, ptr %7, align 8, !tbaa !11
  %62 = call ptr @llvm.stacksave.p0()
  store ptr %62, ptr %11, align 8
  %63 = alloca i8, i64 %61, align 16
  store i64 %61, ptr %12, align 8
  %64 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %63, i8 0, i64 %64, i1 false)
  %65 = load ptr, ptr @opts, align 8, !tbaa !15
  %66 = call ptr @realpath(ptr noundef %65, ptr noundef %63) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #11
  %67 = call i64 @strlen(ptr noundef %63) #13
  %68 = add i64 %67, 1
  store i64 %68, ptr %13, align 8, !tbaa !11
  %69 = load i64, ptr %13, align 8, !tbaa !11
  %70 = call noalias ptr @malloc(i64 noundef %69) #14
  store ptr %70, ptr @opts, align 8, !tbaa !15
  %71 = load ptr, ptr @opts, align 8, !tbaa !15
  %72 = load i64, ptr %13, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %71, i8 0, i64 %72, i1 false)
  %73 = load ptr, ptr @opts, align 8, !tbaa !15
  %74 = load i64, ptr %13, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %73, ptr align 16 %63, i64 %74, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  %75 = load ptr, ptr %11, align 8
  call void @llvm.stackrestore.p0(ptr %75)
  br label %76

76:                                               ; preds = %60, %51
  %77 = load ptr, ptr @root_package, align 8, !tbaa !9
  %78 = icmp ne ptr %77, null
  br i1 %78, label %124, label %79

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #11
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #11
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #11
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %98, %79
  %81 = load i32, ptr %16, align 4, !tbaa !5
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds [0 x ptr], ptr @manifest_names, i64 0, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  store ptr %84, ptr %14, align 8, !tbaa !9
  %85 = load ptr, ptr %14, align 8, !tbaa !9
  %86 = call ptr @fs_read(ptr noundef %85)
  store ptr %86, ptr %15, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %80
  %88 = load i32, ptr %16, align 4, !tbaa !5
  %89 = add i32 %88, 1
  store i32 %89, ptr %16, align 4, !tbaa !5
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [0 x ptr], ptr @manifest_names, i64 0, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %98

94:                                               ; preds = %87
  %95 = load ptr, ptr %15, align 8, !tbaa !9
  %96 = icmp ne ptr %95, null
  %97 = xor i1 %96, true
  br label %98

98:                                               ; preds = %94, %87
  %99 = phi i1 [ false, %87 ], [ %97, %94 ]
  br i1 %99, label %80, label %100, !llvm.loop !17

100:                                              ; preds = %98
  %101 = load ptr, ptr %15, align 8, !tbaa !9
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %123

103:                                              ; preds = %100
  %104 = load ptr, ptr %15, align 8, !tbaa !9
  %105 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 3), align 4, !tbaa !19
  %106 = call ptr @clib_package_new(ptr noundef %104, i32 noundef %105)
  store ptr %106, ptr @root_package, align 8, !tbaa !9
  %107 = load ptr, ptr @root_package, align 8, !tbaa !9
  %108 = icmp ne ptr %107, null
  br i1 %108, label %109, label %121

109:                                              ; preds = %103
  %110 = load ptr, ptr @root_package, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.clib_package_t, ptr %110, i32 0, i32 14
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %121

114:                                              ; preds = %109
  %115 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %116 = icmp ne ptr %115, null
  br i1 %116, label %121, label %117

117:                                              ; preds = %114
  %118 = load ptr, ptr @root_package, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.clib_package_t, ptr %118, i32 0, i32 14
  %120 = load ptr, ptr %119, align 8, !tbaa !20
  store ptr %120, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  br label %121

121:                                              ; preds = %117, %114, %109, %103
  %122 = load ptr, ptr %15, align 8, !tbaa !9
  call void @free(ptr noundef %122) #11
  br label %123

123:                                              ; preds = %121, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #11
  br label %124

124:                                              ; preds = %123, %76
  %125 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %145

127:                                              ; preds = %124
  %128 = load i64, ptr %7, align 8, !tbaa !11
  %129 = call ptr @llvm.stacksave.p0()
  store ptr %129, ptr %17, align 8
  %130 = alloca i8, i64 %128, align 16
  store i64 %128, ptr %18, align 8
  %131 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %132 = call i32 @mkdirp(ptr noundef %131, i32 noundef 511)
  %133 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %130, i8 0, i64 %133, i1 false)
  %134 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %135 = call ptr @realpath(ptr noundef %134, ptr noundef %130) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #11
  %136 = call i64 @strlen(ptr noundef %130) #13
  %137 = add i64 %136, 1
  store i64 %137, ptr %19, align 8, !tbaa !11
  %138 = load i64, ptr %19, align 8, !tbaa !11
  %139 = call noalias ptr @malloc(i64 noundef %138) #14
  store ptr %139, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %140 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %141 = load i64, ptr %19, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %140, i8 0, i64 %141, i1 false)
  %142 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %143 = load i64, ptr %19, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %142, ptr align 16 %130, i64 %143, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  %144 = load ptr, ptr %17, align 8
  call void @llvm.stackrestore.p0(ptr %144)
  br label %145

145:                                              ; preds = %127, %124
  %146 = load i32, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 7), align 8, !tbaa !23
  store i32 %146, ptr @rest_offset, align 4, !tbaa !5
  %147 = load i32, ptr %4, align 4, !tbaa !5
  %148 = icmp sgt i32 %147, 0
  br i1 %148, label %149, label %197

149:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #11
  store i32 0, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %188, %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #11
  %151 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !24
  %152 = load i32, ptr %21, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds ptr, ptr %151, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !9
  store ptr %155, ptr %22, align 8, !tbaa !9
  %156 = load ptr, ptr %22, align 8, !tbaa !9
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %177

158:                                              ; preds = %150
  %159 = load ptr, ptr %22, align 8, !tbaa !9
  %160 = getelementptr inbounds i8, ptr %159, i64 0
  %161 = load i8, ptr %160, align 1, !tbaa !25
  %162 = sext i8 %161 to i32
  %163 = icmp eq i32 45, %162
  br i1 %163, label %164, label %177

164:                                              ; preds = %158
  %165 = load ptr, ptr %22, align 8, !tbaa !9
  %166 = getelementptr inbounds i8, ptr %165, i64 1
  %167 = load i8, ptr %166, align 1, !tbaa !25
  %168 = sext i8 %167 to i32
  %169 = icmp eq i32 45, %168
  br i1 %169, label %170, label %177

170:                                              ; preds = %164
  %171 = load ptr, ptr %22, align 8, !tbaa !9
  %172 = call i64 @strlen(ptr noundef %171) #13
  %173 = icmp eq i64 2, %172
  br i1 %173, label %174, label %177

174:                                              ; preds = %170
  store i32 1, ptr %20, align 4, !tbaa !5
  %175 = load i32, ptr %21, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr @rest_offset, align 4, !tbaa !5
  br label %187

177:                                              ; preds = %170, %164, %158, %150
  %178 = load ptr, ptr %22, align 8, !tbaa !9
  %179 = icmp ne ptr %178, null
  br i1 %179, label %180, label %186

180:                                              ; preds = %177
  %181 = load i32, ptr %20, align 4, !tbaa !5
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %186

183:                                              ; preds = %180
  %184 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr @rest_argc, align 4, !tbaa !5
  br label %186

186:                                              ; preds = %183, %180, %177
  br label %187

187:                                              ; preds = %186, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !24
  %190 = load i32, ptr %21, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %21, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds ptr, ptr %189, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !9
  %195 = icmp ne ptr %194, null
  br i1 %195, label %150, label %196, !llvm.loop !26

196:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #11
  br label %197

197:                                              ; preds = %196, %145
  %198 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %199 = icmp sgt i32 %198, 0
  br i1 %199, label %200, label %230

200:                                              ; preds = %197
  %201 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = mul i64 %202, 8
  %204 = call noalias ptr @malloc(i64 noundef %203) #14
  store ptr %204, ptr @rest_argv, align 8, !tbaa !9
  %205 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  %206 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = mul i64 %207, 8
  call void @llvm.memset.p0.i64(ptr align 8 %205, i8 0, i64 %208, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  %209 = load i32, ptr @rest_offset, align 4, !tbaa !5
  store i32 %209, ptr %24, align 4, !tbaa !5
  br label %210

210:                                              ; preds = %222, %200
  %211 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !24
  %212 = load i32, ptr %24, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %24, align 4, !tbaa !5
  %214 = sext i32 %212 to i64
  %215 = getelementptr inbounds ptr, ptr %211, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !9
  %217 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  %218 = load i32, ptr %23, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %23, align 4, !tbaa !5
  %220 = sext i32 %218 to i64
  %221 = getelementptr inbounds ptr, ptr %217, i64 %220
  store ptr %216, ptr %221, align 8, !tbaa !9
  br label %222

222:                                              ; preds = %210
  %223 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !24
  %224 = load i32, ptr %24, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds ptr, ptr %223, i64 %225
  %227 = load ptr, ptr %226, align 8, !tbaa !9
  %228 = icmp ne ptr %227, null
  br i1 %228, label %210, label %229, !llvm.loop !27

229:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %230

230:                                              ; preds = %229, %197
  %231 = call i32 @curl_global_init(i64 noundef 3)
  %232 = icmp ne i32 0, %231
  br i1 %232, label %233, label %243

233:                                              ; preds = %230
  %234 = load ptr, ptr @stderr, align 8, !tbaa !9
  %235 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %234, ptr noundef @.str.13, ptr noundef @.str.53)
  %236 = load ptr, ptr @stderr, align 8, !tbaa !9
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.15) #11
  %238 = load ptr, ptr @stderr, align 8, !tbaa !9
  %239 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %238, ptr noundef @.str.54)
  %240 = load ptr, ptr @stderr, align 8, !tbaa !9
  %241 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %240, ptr noundef @.str.17) #11
  store i32 %241, ptr %25, align 4, !tbaa !5
  %242 = load i32, ptr %25, align 4, !tbaa !5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %499

243:                                              ; preds = %230
  %244 = call i32 @clib_cache_init(i64 noundef 2592000)
  %245 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 5), align 4, !tbaa !28
  store i32 %245, ptr @package_opts, align 8, !tbaa !29
  %246 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  store ptr %246, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 3), align 8, !tbaa !31
  %247 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 6), align 8, !tbaa !32
  store i32 %247, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 2), align 8, !tbaa !33
  %248 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 2), align 8, !tbaa !34
  store i32 %248, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 1), align 4, !tbaa !35
  call void @clib_package_set_opts(ptr noundef byval(%struct.clib_package_opts_t) align 8 @package_opts)
  %249 = load i32, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 7), align 8, !tbaa !23
  %250 = icmp eq i32 0, %249
  br i1 %250, label %257, label %251

251:                                              ; preds = %243
  %252 = load i32, ptr %4, align 4, !tbaa !5
  %253 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %254 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %255 = add nsw i32 %253, %254
  %256 = icmp eq i32 %252, %255
  br i1 %256, label %257, label %259

257:                                              ; preds = %251, %243
  %258 = call i32 @build_package(ptr noundef %42)
  store i32 %258, ptr %6, align 4, !tbaa !5
  br label %344

259:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #11
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %260

260:                                              ; preds = %340, %259
  %261 = load i32, ptr %26, align 4, !tbaa !5
  %262 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %263 = icmp sle i32 %261, %262
  br i1 %263, label %265, label %264

264:                                              ; preds = %260
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %343

265:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #11
  %266 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !24
  %267 = load i32, ptr %26, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds ptr, ptr %266, i64 %268
  %270 = load ptr, ptr %269, align 8, !tbaa !9
  store ptr %270, ptr %27, align 8, !tbaa !9
  %271 = load ptr, ptr %27, align 8, !tbaa !9
  %272 = getelementptr inbounds i8, ptr %271, i64 0
  %273 = load i8, ptr %272, align 1, !tbaa !25
  %274 = sext i8 %273 to i32
  %275 = icmp eq i32 46, %274
  br i1 %275, label %276, label %284

276:                                              ; preds = %265
  %277 = load i64, ptr %7, align 8, !tbaa !11
  %278 = call ptr @llvm.stacksave.p0()
  store ptr %278, ptr %28, align 8
  %279 = alloca i8, i64 %277, align 16
  store i64 %277, ptr %29, align 8
  %280 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %279, i8 0, i64 %280, i1 false)
  %281 = load ptr, ptr %27, align 8, !tbaa !9
  %282 = call ptr @realpath(ptr noundef %281, ptr noundef %279) #11
  store ptr %282, ptr %27, align 8, !tbaa !9
  %283 = load ptr, ptr %28, align 8
  call void @llvm.stackrestore.p0(ptr %283)
  br label %296

284:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #11
  %285 = load ptr, ptr %27, align 8, !tbaa !9
  %286 = call ptr @fs_stat(ptr noundef %285)
  store ptr %286, ptr %30, align 8, !tbaa !9
  %287 = load ptr, ptr %30, align 8, !tbaa !9
  %288 = icmp ne ptr %287, null
  br i1 %288, label %293, label %289

289:                                              ; preds = %284
  %290 = load ptr, ptr @opts, align 8, !tbaa !15
  %291 = load ptr, ptr %27, align 8, !tbaa !9
  %292 = call ptr @path_join(ptr noundef %290, ptr noundef %291)
  store ptr %292, ptr %27, align 8, !tbaa !9
  br label %295

293:                                              ; preds = %284
  %294 = load ptr, ptr %30, align 8, !tbaa !9
  call void @free(ptr noundef %294) #11
  br label %295

295:                                              ; preds = %293, %289
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #11
  br label %296

296:                                              ; preds = %295, %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  %297 = load ptr, ptr %27, align 8, !tbaa !9
  %298 = call ptr @fs_stat(ptr noundef %297)
  store ptr %298, ptr %31, align 8, !tbaa !9
  %299 = load ptr, ptr %31, align 8, !tbaa !9
  %300 = icmp ne ptr %299, null
  br i1 %300, label %301, label %321

301:                                              ; preds = %296
  %302 = load ptr, ptr %31, align 8, !tbaa !9
  %303 = getelementptr inbounds %struct.stat, ptr %302, i32 0, i32 3
  %304 = load i32, ptr %303, align 8, !tbaa !36
  %305 = and i32 %304, 61440
  %306 = icmp eq i32 32768, %305
  br i1 %306, label %313, label %307

307:                                              ; preds = %301
  %308 = load ptr, ptr %31, align 8, !tbaa !9
  %309 = getelementptr inbounds %struct.stat, ptr %308, i32 0, i32 3
  %310 = load i32, ptr %309, align 8, !tbaa !36
  %311 = and i32 %310, 61440
  %312 = icmp eq i32 40960, %311
  br i1 %312, label %313, label %321

313:                                              ; preds = %307, %301
  %314 = load ptr, ptr %27, align 8, !tbaa !9
  %315 = call ptr @__xpg_basename(ptr noundef %314) #11
  store ptr %315, ptr %27, align 8, !tbaa !9
  %316 = load ptr, ptr %27, align 8, !tbaa !9
  %317 = call ptr @dirname(ptr noundef %316) #11
  %318 = load ptr, ptr %27, align 8, !tbaa !9
  %319 = call ptr @__xpg_basename(ptr noundef %318) #11
  %320 = call i32 @build_package_with_manifest_name(ptr noundef %317, ptr noundef %319)
  store i32 %320, ptr %6, align 4, !tbaa !5
  br label %334

321:                                              ; preds = %307, %296
  %322 = load ptr, ptr %27, align 8, !tbaa !9
  %323 = call i32 @build_package(ptr noundef %322)
  store i32 %323, ptr %6, align 4, !tbaa !5
  %324 = load i32, ptr %6, align 4, !tbaa !5
  %325 = icmp ne i32 0, %324
  br i1 %325, label %326, label %333

326:                                              ; preds = %321
  %327 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !24
  %328 = load i32, ptr %26, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds ptr, ptr %327, i64 %329
  %331 = load ptr, ptr %330, align 8, !tbaa !9
  %332 = call i32 @build_package(ptr noundef %331)
  store i32 %332, ptr %6, align 4, !tbaa !5
  br label %333

333:                                              ; preds = %326, %321
  br label %334

334:                                              ; preds = %333, %313
  %335 = load ptr, ptr %31, align 8, !tbaa !9
  %336 = icmp ne ptr %335, null
  br i1 %336, label %337, label %339

337:                                              ; preds = %334
  %338 = load ptr, ptr %31, align 8, !tbaa !9
  call void @free(ptr noundef %338) #11
  store ptr null, ptr %31, align 8, !tbaa !9
  br label %339

339:                                              ; preds = %337, %334
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  br label %340

340:                                              ; preds = %339
  %341 = load i32, ptr %26, align 4, !tbaa !5
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %26, align 4, !tbaa !5
  br label %260, !llvm.loop !39

343:                                              ; preds = %264
  br label %344

344:                                              ; preds = %343, %257
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #11
  store i32 0, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #11
  store i32 0, ptr %35, align 4, !tbaa !5
  br label %345

345:                                              ; preds = %395, %344
  %346 = load i32, ptr %35, align 4, !tbaa !5
  %347 = load ptr, ptr @built, align 8, !tbaa !9
  %348 = getelementptr inbounds %struct.kh_ptr_t, ptr %347, i32 0, i32 0
  %349 = load i32, ptr %348, align 8, !tbaa !40
  %350 = icmp ult i32 %346, %349
  br i1 %350, label %352, label %351

351:                                              ; preds = %345
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #11
  br label %398

352:                                              ; preds = %345
  %353 = load ptr, ptr @built, align 8, !tbaa !9
  %354 = getelementptr inbounds %struct.kh_ptr_t, ptr %353, i32 0, i32 4
  %355 = load ptr, ptr %354, align 8, !tbaa !42
  %356 = load i32, ptr %35, align 4, !tbaa !5
  %357 = lshr i32 %356, 4
  %358 = zext i32 %357 to i64
  %359 = getelementptr inbounds i32, ptr %355, i64 %358
  %360 = load i32, ptr %359, align 4, !tbaa !5
  %361 = load i32, ptr %35, align 4, !tbaa !5
  %362 = and i32 %361, 15
  %363 = shl i32 %362, 1
  %364 = lshr i32 %360, %363
  %365 = and i32 %364, 3
  %366 = icmp ne i32 %365, 0
  br i1 %366, label %367, label %368

367:                                              ; preds = %352
  br label %395

368:                                              ; preds = %352
  %369 = load ptr, ptr @built, align 8, !tbaa !9
  %370 = getelementptr inbounds %struct.kh_ptr_t, ptr %369, i32 0, i32 5
  %371 = load ptr, ptr %370, align 8, !tbaa !43
  %372 = load i32, ptr %35, align 4, !tbaa !5
  %373 = zext i32 %372 to i64
  %374 = getelementptr inbounds ptr, ptr %371, i64 %373
  %375 = load ptr, ptr %374, align 8, !tbaa !9
  store ptr %375, ptr %33, align 8, !tbaa !9
  %376 = load ptr, ptr @built, align 8, !tbaa !9
  %377 = getelementptr inbounds %struct.kh_ptr_t, ptr %376, i32 0, i32 6
  %378 = load ptr, ptr %377, align 8, !tbaa !44
  %379 = load i32, ptr %35, align 4, !tbaa !5
  %380 = zext i32 %379 to i64
  %381 = getelementptr inbounds ptr, ptr %378, i64 %380
  %382 = load ptr, ptr %381, align 8, !tbaa !9
  store ptr %382, ptr %34, align 8, !tbaa !9
  %383 = load ptr, ptr %34, align 8, !tbaa !9
  %384 = call i32 @strncmp(ptr noundef @.str.19, ptr noundef %383, i64 noundef 1) #13
  %385 = icmp eq i32 0, %384
  br i1 %385, label %386, label %389

386:                                              ; preds = %368
  %387 = load i32, ptr %32, align 4, !tbaa !5
  %388 = add nsw i32 %387, 1
  store i32 %388, ptr %32, align 4, !tbaa !5
  br label %389

389:                                              ; preds = %386, %368
  %390 = load ptr, ptr %33, align 8, !tbaa !9
  %391 = icmp ne ptr null, %390
  br i1 %391, label %392, label %394

392:                                              ; preds = %389
  %393 = load ptr, ptr %33, align 8, !tbaa !9
  call void @free(ptr noundef %393) #11
  br label %394

394:                                              ; preds = %392, %389
  br label %395

395:                                              ; preds = %394, %367
  %396 = load i32, ptr %35, align 4, !tbaa !5
  %397 = add i32 %396, 1
  store i32 %397, ptr %35, align 4, !tbaa !5
  br label %345, !llvm.loop !45

398:                                              ; preds = %351
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #11
  %399 = load ptr, ptr @built, align 8, !tbaa !9
  call void @kh_destroy_ptr(ptr noundef %399)
  call void @command_free(ptr noundef @program)
  call void @curl_global_cleanup()
  call void (...) @clib_package_cleanup()
  %400 = load ptr, ptr @opts, align 8, !tbaa !15
  %401 = icmp ne ptr %400, null
  br i1 %401, label %402, label %404

402:                                              ; preds = %398
  %403 = load ptr, ptr @opts, align 8, !tbaa !15
  call void @free(ptr noundef %403) #11
  br label %404

404:                                              ; preds = %402, %398
  %405 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  %406 = icmp ne ptr %405, null
  br i1 %406, label %407, label %409

407:                                              ; preds = %404
  %408 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !22
  call void @free(ptr noundef %408) #11
  br label %409

409:                                              ; preds = %407, %404
  %410 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %411 = icmp sgt i32 %410, 0
  br i1 %411, label %412, label %414

412:                                              ; preds = %409
  %413 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  call void @free(ptr noundef %413) #11
  store i32 0, ptr @rest_offset, align 4, !tbaa !5
  store i32 0, ptr @rest_argc, align 4, !tbaa !5
  store ptr null, ptr @rest_argv, align 8, !tbaa !9
  br label %414

414:                                              ; preds = %412, %409
  %415 = load i32, ptr %6, align 4, !tbaa !5
  %416 = icmp eq i32 0, %415
  br i1 %416, label %417, label %497

417:                                              ; preds = %414
  %418 = load i32, ptr %32, align 4, !tbaa !5
  %419 = icmp sgt i32 %418, 0
  br i1 %419, label %420, label %422

420:                                              ; preds = %417
  %421 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  br label %422

422:                                              ; preds = %420, %417
  %423 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 3), align 4, !tbaa !19
  %424 = icmp ne i32 %423, 0
  br i1 %424, label %425, label %496

425:                                              ; preds = %422
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #11
  store ptr @.str.2, ptr %36, align 8, !tbaa !9
  %426 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 7), align 8, !tbaa !46
  %427 = icmp ne ptr %426, null
  br i1 %427, label %431, label %428

428:                                              ; preds = %425
  %429 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 8), align 8, !tbaa !47
  %430 = icmp ne ptr %429, null
  br i1 %430, label %431, label %446

431:                                              ; preds = %428, %425
  store ptr null, ptr %36, align 8, !tbaa !9
  %432 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 7), align 8, !tbaa !46
  %433 = icmp ne ptr %432, null
  br i1 %433, label %434, label %438

434:                                              ; preds = %431
  %435 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 8), align 8, !tbaa !47
  %436 = icmp ne ptr %435, null
  br i1 %436, label %437, label %438

437:                                              ; preds = %434
  br label %443

438:                                              ; preds = %434, %431
  %439 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 7), align 8, !tbaa !46
  %440 = icmp ne ptr %439, null
  %441 = zext i1 %440 to i64
  %442 = select i1 %440, ptr @.str.57, ptr @.str.58
  br label %443

443:                                              ; preds = %438, %437
  %444 = phi ptr [ @.str.56, %437 ], [ %442, %438 ]
  %445 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %36, ptr noundef @.str.55, ptr noundef %444)
  br label %446

446:                                              ; preds = %443, %428
  %447 = load i32, ptr %32, align 4, !tbaa !5
  %448 = icmp sgt i32 %447, 1
  br i1 %448, label %449, label %461

449:                                              ; preds = %446
  %450 = load ptr, ptr @stdout, align 8, !tbaa !9
  %451 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %450, ptr noundef @.str.13, ptr noundef @.str.59)
  %452 = load ptr, ptr @stdout, align 8, !tbaa !9
  %453 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %452, ptr noundef @.str.15) #11
  %454 = load ptr, ptr @stdout, align 8, !tbaa !9
  %455 = load i32, ptr %32, align 4, !tbaa !5
  %456 = load ptr, ptr %36, align 8, !tbaa !9
  %457 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %454, ptr noundef @.str.60, i32 noundef %455, ptr noundef %456)
  %458 = load ptr, ptr @stdout, align 8, !tbaa !9
  %459 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %458, ptr noundef @.str.17) #11
  store i32 %459, ptr %37, align 4, !tbaa !5
  %460 = load i32, ptr %37, align 4, !tbaa !5
  br label %487

461:                                              ; preds = %446
  %462 = load i32, ptr %32, align 4, !tbaa !5
  %463 = icmp eq i32 1, %462
  br i1 %463, label %464, label %475

464:                                              ; preds = %461
  %465 = load ptr, ptr @stdout, align 8, !tbaa !9
  %466 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %465, ptr noundef @.str.13, ptr noundef @.str.59)
  %467 = load ptr, ptr @stdout, align 8, !tbaa !9
  %468 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %467, ptr noundef @.str.15) #11
  %469 = load ptr, ptr @stdout, align 8, !tbaa !9
  %470 = load ptr, ptr %36, align 8, !tbaa !9
  %471 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %469, ptr noundef @.str.61, ptr noundef %470)
  %472 = load ptr, ptr @stdout, align 8, !tbaa !9
  %473 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %472, ptr noundef @.str.17) #11
  store i32 %473, ptr %38, align 4, !tbaa !5
  %474 = load i32, ptr %38, align 4, !tbaa !5
  br label %486

475:                                              ; preds = %461
  %476 = load ptr, ptr @stdout, align 8, !tbaa !9
  %477 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %476, ptr noundef @.str.13, ptr noundef @.str.59)
  %478 = load ptr, ptr @stdout, align 8, !tbaa !9
  %479 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %478, ptr noundef @.str.15) #11
  %480 = load ptr, ptr @stdout, align 8, !tbaa !9
  %481 = load ptr, ptr %36, align 8, !tbaa !9
  %482 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %480, ptr noundef @.str.62, ptr noundef %481)
  %483 = load ptr, ptr @stdout, align 8, !tbaa !9
  %484 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %483, ptr noundef @.str.17) #11
  store i32 %484, ptr %39, align 4, !tbaa !5
  %485 = load i32, ptr %39, align 4, !tbaa !5
  br label %486

486:                                              ; preds = %475, %464
  br label %487

487:                                              ; preds = %486, %449
  %488 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 7), align 8, !tbaa !46
  %489 = icmp ne ptr %488, null
  br i1 %489, label %493, label %490

490:                                              ; preds = %487
  %491 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 8), align 8, !tbaa !47
  %492 = icmp ne ptr %491, null
  br i1 %492, label %493, label %495

493:                                              ; preds = %490, %487
  %494 = load ptr, ptr %36, align 8, !tbaa !9
  call void @free(ptr noundef %494) #11
  br label %495

495:                                              ; preds = %493, %490
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #11
  br label %496

496:                                              ; preds = %495, %422
  br label %497

497:                                              ; preds = %496, %414
  %498 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %498, ptr %3, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  br label %499

499:                                              ; preds = %497, %233, %47
  %500 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %500)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  %501 = load i32, ptr %3, align 4
  ret i32 %501
}

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #9

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @setopt_dir(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_prefix(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_quiet(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_global(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_clean(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_test(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_dev(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_force(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_skip_cache(ptr noundef) #0

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

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

declare i32 @curl_global_init(i64 noundef) #2

declare i32 @clib_cache_init(i64 noundef) #2

declare ptr @fs_stat(ptr noundef) #2

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @kh_destroy_ptr(ptr noundef) #10

declare void @command_free(ptr noundef) #2

declare void @curl_global_cleanup() #2

declare void @clib_package_cleanup(...) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @kh_init_ptr() #10

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 willreturn memory(none) "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 = { inlinehint 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 #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(none) }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"command", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !7, i64 48, !6, i64 1840, !7, i64 1848, !10, i64 2104}
!15 = !{!16, !10, i64 0}
!16 = !{!"options", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !10, i64 40, !10, i64 48}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!16, !6, i64 20}
!20 = !{!21, !10, i64 112}
!21 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !6, i64 152}
!22 = !{!16, !10, i64 8}
!23 = !{!14, !6, i64 1840}
!24 = !{!14, !10, i64 2104}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !18}
!28 = !{!16, !6, i64 28}
!29 = !{!30, !6, i64 0}
!30 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!31 = !{!30, !10, i64 16}
!32 = !{!16, !6, i64 32}
!33 = !{!30, !6, i64 8}
!34 = !{!16, !6, i64 16}
!35 = !{!30, !6, i64 4}
!36 = !{!37, !6, i64 24}
!37 = !{!"stat", !12, i64 0, !12, i64 8, !12, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !38, i64 72, !38, i64 88, !38, i64 104, !7, i64 120}
!38 = !{!"timespec", !12, i64 0, !12, i64 8}
!39 = distinct !{!39, !18}
!40 = !{!41, !6, i64 0}
!41 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32}
!42 = !{!41, !10, i64 16}
!43 = !{!41, !10, i64 24}
!44 = !{!41, !10, i64 32}
!45 = distinct !{!45, !18}
!46 = !{!16, !10, i64 40}
!47 = !{!16, !10, i64 48}


; 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.command = type { ptr, ptr, ptr, ptr, ptr, i32, [32 x %struct.command_option_t], i32, [32 x ptr], ptr }
%struct.command_option_t = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.debug_t = type { ptr, i32, i32, ptr }
%struct.options = type { ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr }

@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
@program = external dso_local global %struct.command, align 8
@debugger = external dso_local global %struct.debug_t, align 8
@built = external dso_local local_unnamed_addr global ptr, align 8
@rest_argv = external dso_local local_unnamed_addr global ptr, align 8
@rest_offset = external dso_local local_unnamed_addr global i32, align 4
@rest_argc = external dso_local local_unnamed_addr global i32, align 4
@opts = external dso_local local_unnamed_addr global %struct.options, align 8
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@manifest_names = external local_unnamed_addr global [0 x ptr], align 8
@.str.22 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [28 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.53 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @build_package_with_manifest_name(ptr noundef, ptr noundef) local_unnamed_addr #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

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: 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 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: 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 @cc_fprintf(i32 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 void @hash_set(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %4, i8 0, i64 4096, i1 false)
  %5 = call ptr @getcwd(ptr noundef nonnull %4, i64 noundef 4096) #14
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %11

7:                                                ; preds = %2
  %8 = tail call ptr @__errno_location() #15
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = sub nsw i32 0, %9
  br label %250

11:                                               ; preds = %2
  %12 = call ptr @kh_init_ptr()
  store ptr %12, ptr @built, align 8, !tbaa !9
  %13 = call noalias ptr @strdup(ptr noundef nonnull @.str.22) #14
  call void @hash_set(ptr noundef %12, ptr noundef %13, ptr noundef nonnull @.str.23) #14
  call void @command_init(ptr noundef nonnull @program, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.23) #14
  %14 = call i32 @debug_init(ptr noundef nonnull @debugger, ptr noundef nonnull @.str.24) #14
  store ptr @.str.25, ptr getelementptr inbounds (i8, ptr @program, i64 8), align 8, !tbaa !11
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.28, ptr noundef nonnull @setopt_dir) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.31, ptr noundef nonnull @setopt_prefix) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.34, ptr noundef nonnull @setopt_quiet) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.37, ptr noundef nonnull @setopt_global) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.40, ptr noundef nonnull @setopt_clean) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43, ptr noundef nonnull @setopt_test) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.46, ptr noundef nonnull @setopt_dev) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.48, ptr noundef nonnull @.str.49, ptr noundef nonnull @setopt_force) #14
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.50, ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.52, ptr noundef nonnull @setopt_skip_cache) #14
  call void @command_parse(ptr noundef nonnull @program, i32 noundef %0, ptr noundef %1) #14
  %15 = load ptr, ptr @opts, align 8, !tbaa !13
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %23, label %16

16:                                               ; preds = %11
  %17 = call ptr @llvm.stacksave.p0()
  %18 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %18, i8 0, i64 4096, i1 false)
  %19 = load ptr, ptr @opts, align 8, !tbaa !13
  %20 = call ptr @realpath(ptr noundef %19, ptr noundef nonnull %18) #14
  %21 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %18) #16
  %22 = add i64 %21, 1
  %calloc179 = call ptr @calloc(i64 1, i64 %22)
  store ptr %calloc179, ptr @opts, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %calloc179, ptr nonnull align 16 %18, i64 %22, i1 false)
  call void @llvm.stackrestore.p0(ptr %17)
  br label %23

23:                                               ; preds = %16, %11
  %24 = load ptr, ptr @root_package, align 8, !tbaa !9
  %.not119 = icmp eq ptr %24, null
  br i1 %.not119, label %.preheader146.preheader, label %45

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

.preheader146:                                    ; preds = %.preheader146.preheader, %.preheader146
  %25 = phi ptr [ %30, %.preheader146 ], [ %.pre, %.preheader146.preheader ]
  %.097 = phi i32 [ %27, %.preheader146 ], [ 0, %.preheader146.preheader ]
  %26 = call ptr @fs_read(ptr noundef %25) #14
  %27 = add i32 %.097, 1
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds [0 x ptr], ptr @manifest_names, i64 0, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = icmp ne ptr %30, null
  %.not120 = icmp eq ptr %26, null
  %32 = select i1 %31, i1 %.not120, i1 false
  br i1 %32, label %.preheader146, label %33, !llvm.loop !15

33:                                               ; preds = %.preheader146
  br i1 %.not120, label %45, label %34

34:                                               ; preds = %33
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 20), align 4, !tbaa !17
  %36 = call ptr @clib_package_new(ptr noundef nonnull %26, i32 noundef %35) #14
  store ptr %36, ptr @root_package, align 8, !tbaa !9
  %.not121 = icmp eq ptr %36, null
  br i1 %.not121, label %44, label %37

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %36, i64 112
  %39 = load ptr, ptr %38, align 8, !tbaa !18
  %40 = icmp eq ptr %39, null
  %41 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8
  %42 = icmp ne ptr %41, null
  %or.cond = select i1 %40, i1 true, i1 %42
  br i1 %or.cond, label %44, label %43

43:                                               ; preds = %37
  store ptr %39, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  br label %44

44:                                               ; preds = %43, %37, %34
  call void @free(ptr noundef nonnull %26) #14
  br label %45

45:                                               ; preds = %33, %44, %23
  %46 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  %.not122 = icmp eq ptr %46, null
  br i1 %.not122, label %56, label %47

47:                                               ; preds = %45
  %48 = call ptr @llvm.stacksave.p0()
  %49 = alloca [4096 x i8], align 16
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  %51 = call i32 @mkdirp(ptr noundef %50, i32 noundef 511) #14
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %49, i8 0, i64 4096, i1 false)
  %52 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  %53 = call ptr @realpath(ptr noundef %52, ptr noundef nonnull %49) #14
  %54 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %49) #16
  %55 = add i64 %54, 1
  %calloc178 = call ptr @calloc(i64 1, i64 %55)
  store ptr %calloc178, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %calloc178, ptr nonnull align 16 %49, i64 %55, i1 false)
  call void @llvm.stackrestore.p0(ptr %48)
  br label %56

56:                                               ; preds = %47, %45
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @program, i64 1840), align 8, !tbaa !21
  store i32 %57, ptr @rest_offset, align 4, !tbaa !5
  %58 = icmp sgt i32 %0, 0
  br i1 %58, label %.preheader144, label %..loopexit145_crit_edge

..loopexit145_crit_edge:                          ; preds = %56
  %.pre173 = load i32, ptr @rest_argc, align 4, !tbaa !5
  br label %.loopexit145

.preheader144:                                    ; preds = %56
  %59 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !22
  %rest_argc.promoted = load i32, ptr @rest_argc, align 4, !tbaa !5
  %.pre172 = load ptr, ptr %59, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %.preheader144, %.thread
  %61 = phi i32 [ %57, %.preheader144 ], [ %80, %.thread ]
  %62 = phi ptr [ %.pre172, %.preheader144 ], [ %83, %.thread ]
  %indvars.iv = phi i64 [ 0, %.preheader144 ], [ %indvars.iv.next, %.thread ]
  %63 = phi i32 [ %rest_argc.promoted, %.preheader144 ], [ %81, %.thread ]
  %.098 = phi i32 [ 0, %.preheader144 ], [ %.199, %.thread ]
  %.not141 = icmp eq ptr %62, null
  br i1 %.not141, label %.thread, label %64

64:                                               ; preds = %60
  %65 = load i8, ptr %62, align 1, !tbaa !23
  %66 = icmp eq i8 %65, 45
  br i1 %66, label %67, label %77

67:                                               ; preds = %64
  %68 = getelementptr inbounds i8, ptr %62, i64 1
  %69 = load i8, ptr %68, align 1, !tbaa !23
  %70 = icmp eq i8 %69, 45
  br i1 %70, label %71, label %77

71:                                               ; preds = %67
  %72 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %62) #16
  %73 = icmp eq i64 %72, 2
  br i1 %73, label %74, label %77

74:                                               ; preds = %71
  %75 = trunc i64 %indvars.iv to i32
  %76 = add i32 %75, 1
  store i32 %76, ptr @rest_offset, align 4, !tbaa !5
  br label %.thread

77:                                               ; preds = %71, %67, %64
  %.not142 = icmp eq i32 %.098, 0
  br i1 %.not142, label %.thread, label %78

78:                                               ; preds = %77
  %79 = add nsw i32 %63, 1
  store i32 %79, ptr @rest_argc, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %60, %77, %78, %74
  %80 = phi i32 [ %76, %74 ], [ %61, %78 ], [ %61, %77 ], [ %61, %60 ]
  %81 = phi i32 [ %63, %74 ], [ %79, %78 ], [ %63, %77 ], [ %63, %60 ]
  %.199 = phi i32 [ 1, %74 ], [ 1, %78 ], [ 0, %77 ], [ %.098, %60 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %82 = getelementptr inbounds ptr, ptr %59, i64 %indvars.iv.next
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %.not123 = icmp eq ptr %83, null
  br i1 %.not123, label %.loopexit145, label %60, !llvm.loop !24

.loopexit145:                                     ; preds = %.thread, %..loopexit145_crit_edge
  %84 = phi i32 [ %57, %..loopexit145_crit_edge ], [ %80, %.thread ]
  %85 = phi i32 [ %.pre173, %..loopexit145_crit_edge ], [ %81, %.thread ]
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %87, label %.loopexit143

87:                                               ; preds = %.loopexit145
  %88 = zext nneg i32 %85 to i64
  %89 = shl nuw nsw i64 %88, 3
  %calloc = call ptr @calloc(i64 1, i64 %89)
  store ptr %calloc, ptr @rest_argv, align 8, !tbaa !9
  %90 = sext i32 %84 to i64
  %.pre174 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !22
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre174, i64 %90
  %.pre175 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %91, %87
  %92 = phi ptr [ %97, %91 ], [ %.pre175, %87 ]
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %91 ], [ 0, %87 ]
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %91 ], [ %90, %87 ]
  %indvars.iv.next160 = add nsw i64 %indvars.iv159, 1
  %93 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %94 = getelementptr inbounds ptr, ptr %93, i64 %indvars.iv161
  store ptr %92, ptr %94, align 8, !tbaa !9
  %95 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !22
  %96 = getelementptr inbounds ptr, ptr %95, i64 %indvars.iv.next160
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  %.not124 = icmp eq ptr %97, null
  br i1 %.not124, label %.loopexit143, label %91, !llvm.loop !25

.loopexit143:                                     ; preds = %91, %.loopexit145
  %98 = call i32 @curl_global_init(i64 noundef 3) #14
  %.not125 = icmp eq i32 %98, 0
  br i1 %.not125, label %108, label %99

99:                                               ; preds = %.loopexit143
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %100, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.53) #14
  %102 = load ptr, ptr @stderr, align 8, !tbaa !9
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef nonnull @.str.15) #17
  %104 = load ptr, ptr @stderr, align 8, !tbaa !9
  %105 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %104, ptr noundef nonnull @.str.54) #14
  %106 = load ptr, ptr @stderr, align 8, !tbaa !9
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef nonnull @.str.17) #17
  br label %250

108:                                              ; preds = %.loopexit143
  %109 = call i32 @clib_cache_init(i64 noundef 2592000) #14
  %110 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 28), align 4, !tbaa !26
  store i32 %110, ptr @package_opts, align 8, !tbaa !27
  %111 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  store ptr %111, ptr getelementptr inbounds (i8, ptr @package_opts, i64 16), align 8, !tbaa !29
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 32), align 8, !tbaa !30
  store i32 %112, ptr getelementptr inbounds (i8, ptr @package_opts, i64 8), align 8, !tbaa !31
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 16), align 8, !tbaa !32
  store i32 %113, ptr getelementptr inbounds (i8, ptr @package_opts, i64 4), align 4, !tbaa !33
  call void @clib_package_set_opts(ptr noundef nonnull byval(%struct.clib_package_opts_t) align 8 @package_opts) #14
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @program, i64 1840), align 8, !tbaa !21
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %121, label %116

116:                                              ; preds = %108
  %117 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %118 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %119 = add nsw i32 %118, %117
  %120 = icmp eq i32 %119, %0
  br i1 %120, label %121, label %.preheader

.preheader:                                       ; preds = %116
  %.not126148 = icmp slt i32 %117, 1
  br i1 %.not126148, label %.loopexit, label %.lr.ph

121:                                              ; preds = %116, %108
  %122 = call i32 @build_package(ptr noundef nonnull %4)
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %157
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %157 ], [ 1, %.preheader ]
  %123 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !22
  %124 = getelementptr inbounds ptr, ptr %123, i64 %indvars.iv166
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = load i8, ptr %125, align 1, !tbaa !23
  %127 = icmp eq i8 %126, 46
  br i1 %127, label %128, label %132

128:                                              ; preds = %.lr.ph
  %129 = call ptr @llvm.stacksave.p0()
  %130 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %130, i8 0, i64 4096, i1 false)
  %131 = call ptr @realpath(ptr noundef nonnull %125, ptr noundef nonnull %130) #14
  call void @llvm.stackrestore.p0(ptr %129)
  br label %138

132:                                              ; preds = %.lr.ph
  %133 = call ptr @fs_stat(ptr noundef nonnull %125) #14
  %.not127 = icmp eq ptr %133, null
  br i1 %.not127, label %134, label %137

134:                                              ; preds = %132
  %135 = load ptr, ptr @opts, align 8, !tbaa !13
  %136 = call ptr @path_join(ptr noundef %135, ptr noundef nonnull %125) #14
  br label %138

137:                                              ; preds = %132
  call void @free(ptr noundef nonnull %133) #14
  br label %138

138:                                              ; preds = %134, %137, %128
  %.1102 = phi ptr [ %131, %128 ], [ %125, %137 ], [ %136, %134 ]
  %139 = call ptr @fs_stat(ptr noundef %.1102) #14
  %.not128 = icmp eq ptr %139, null
  br i1 %.not128, label %148, label %140

140:                                              ; preds = %138
  %141 = getelementptr inbounds i8, ptr %139, i64 24
  %142 = load i32, ptr %141, align 8, !tbaa !34
  %143 = trunc i32 %142 to i16
  %trunc = and i16 %143, -4096
  switch i16 %trunc, label %148 [
    i16 -32768, label %.thread137
    i16 -24576, label %.thread137
  ]

.thread137:                                       ; preds = %140, %140
  %144 = call ptr @__xpg_basename(ptr noundef %.1102) #14
  %145 = call ptr @dirname(ptr noundef %144) #14
  %146 = call ptr @__xpg_basename(ptr noundef %144) #14
  %147 = call i32 @build_package_with_manifest_name(ptr noundef %145, ptr noundef %146)
  br label %156

148:                                              ; preds = %140, %138
  %149 = call i32 @build_package(ptr noundef %.1102)
  %.not129 = icmp eq i32 %149, 0
  br i1 %.not129, label %155, label %150

150:                                              ; preds = %148
  %151 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !22
  %152 = getelementptr inbounds ptr, ptr %151, i64 %indvars.iv166
  %153 = load ptr, ptr %152, align 8, !tbaa !9
  %154 = call i32 @build_package(ptr noundef %153)
  br label %155

155:                                              ; preds = %148, %150
  %.1 = phi i32 [ %154, %150 ], [ 0, %148 ]
  br i1 %.not128, label %157, label %156

156:                                              ; preds = %.thread137, %155
  %.1139 = phi i32 [ %147, %.thread137 ], [ %.1, %155 ]
  call void @free(ptr noundef nonnull %139) #14
  br label %157

157:                                              ; preds = %156, %155
  %.1140 = phi i32 [ %.1139, %156 ], [ %.1, %155 ]
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %158 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %.not126.not = icmp slt i64 %indvars.iv166, %159
  br i1 %.not126.not, label %.lr.ph, label %.loopexit, !llvm.loop !38

.loopexit:                                        ; preds = %157, %.preheader, %121
  %.2 = phi i32 [ %122, %121 ], [ 0, %.preheader ], [ %.1140, %157 ]
  %160 = load ptr, ptr @built, align 8, !tbaa !9
  %161 = load i32, ptr %160, align 8, !tbaa !39
  %.not155 = icmp eq i32 %161, 0
  br i1 %.not155, label %._crit_edge, label %.lr.ph152

.lr.ph152:                                        ; preds = %.loopexit
  %lhsc = load i8, ptr @.str.19, align 1
  br label %163

._crit_edge:                                      ; preds = %188, %.loopexit
  %.094.lcssa = phi i32 [ 0, %.loopexit ], [ %.296, %188 ]
  %.lcssa = phi ptr [ %160, %.loopexit ], [ %190, %188 ]
  call void @kh_destroy_ptr(ptr noundef nonnull %.lcssa)
  call void @command_free(ptr noundef nonnull @program) #14
  call void @curl_global_cleanup() #14
  call void (...) @clib_package_cleanup() #14
  %162 = load ptr, ptr @opts, align 8, !tbaa !13
  %.not130 = icmp eq ptr %162, null
  br i1 %.not130, label %194, label %193

163:                                              ; preds = %.lr.ph152, %188
  %164 = phi i32 [ %161, %.lr.ph152 ], [ %189, %188 ]
  %165 = phi ptr [ %160, %.lr.ph152 ], [ %190, %188 ]
  %indvars.iv169 = phi i64 [ 0, %.lr.ph152 ], [ %indvars.iv.next170, %188 ]
  %.094150 = phi i32 [ 0, %.lr.ph152 ], [ %.296, %188 ]
  %166 = getelementptr inbounds i8, ptr %165, i64 16
  %167 = load ptr, ptr %166, align 8, !tbaa !41
  %168 = trunc nuw i64 %indvars.iv169 to i32
  %169 = lshr i64 %indvars.iv169, 4
  %170 = getelementptr inbounds i32, ptr %167, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = shl i32 %168, 1
  %173 = and i32 %172, 30
  %174 = shl nuw i32 3, %173
  %175 = and i32 %171, %174
  %.not133 = icmp eq i32 %175, 0
  br i1 %.not133, label %176, label %188

176:                                              ; preds = %163
  %177 = getelementptr inbounds i8, ptr %165, i64 24
  %178 = load ptr, ptr %177, align 8, !tbaa !42
  %179 = getelementptr inbounds ptr, ptr %178, i64 %indvars.iv169
  %180 = load ptr, ptr %179, align 8, !tbaa !9
  %181 = getelementptr inbounds i8, ptr %165, i64 32
  %182 = load ptr, ptr %181, align 8, !tbaa !43
  %183 = getelementptr inbounds ptr, ptr %182, i64 %indvars.iv169
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %rhsc = load i8, ptr %184, align 1
  %185 = icmp eq i8 %lhsc, %rhsc
  %186 = zext i1 %185 to i32
  %spec.select = add nsw i32 %.094150, %186
  %.not134 = icmp eq ptr %180, null
  br i1 %.not134, label %188, label %187

187:                                              ; preds = %176
  call void @free(ptr noundef nonnull %180) #14
  %.pre176 = load ptr, ptr @built, align 8, !tbaa !9
  %.pre177 = load i32, ptr %.pre176, align 8, !tbaa !39
  br label %188

188:                                              ; preds = %176, %187, %163
  %189 = phi i32 [ %164, %163 ], [ %.pre177, %187 ], [ %164, %176 ]
  %190 = phi ptr [ %165, %163 ], [ %.pre176, %187 ], [ %165, %176 ]
  %.296 = phi i32 [ %.094150, %163 ], [ %spec.select, %187 ], [ %spec.select, %176 ]
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %191 = zext i32 %189 to i64
  %192 = icmp ult i64 %indvars.iv.next170, %191
  br i1 %192, label %163, label %._crit_edge, !llvm.loop !44

193:                                              ; preds = %._crit_edge
  call void @free(ptr noundef nonnull %162) #14
  br label %194

194:                                              ; preds = %193, %._crit_edge
  %195 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !20
  %.not131 = icmp eq ptr %195, null
  br i1 %.not131, label %197, label %196

196:                                              ; preds = %194
  call void @free(ptr noundef nonnull %195) #14
  br label %197

197:                                              ; preds = %196, %194
  %198 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %199 = icmp sgt i32 %198, 0
  br i1 %199, label %200, label %202

200:                                              ; preds = %197
  %201 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  call void @free(ptr noundef %201) #14
  store i32 0, ptr @rest_offset, align 4, !tbaa !5
  store i32 0, ptr @rest_argc, align 4, !tbaa !5
  store ptr null, ptr @rest_argv, align 8, !tbaa !9
  br label %202

202:                                              ; preds = %200, %197
  %203 = icmp eq i32 %.2, 0
  br i1 %203, label %204, label %250

204:                                              ; preds = %202
  %205 = icmp sgt i32 %.094.lcssa, 0
  br i1 %205, label %206, label %208

206:                                              ; preds = %204
  %207 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  br label %208

208:                                              ; preds = %206, %204
  %209 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 20), align 4, !tbaa !17
  %.not132 = icmp eq i32 %209, 0
  br i1 %.not132, label %250, label %210

210:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #14
  store ptr @.str.2, ptr %3, align 8, !tbaa !9
  %211 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 40), align 8, !tbaa !45
  %212 = icmp ne ptr %211, null
  %213 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 48), align 8
  %214 = icmp ne ptr %213, null
  %or.cond5 = select i1 %212, i1 true, i1 %214
  br i1 %or.cond5, label %215, label %218

215:                                              ; preds = %210
  store ptr null, ptr %3, align 8, !tbaa !9
  %216 = select i1 %214, ptr @.str.56, ptr @.str.57
  %spec.select135 = select i1 %212, ptr %216, ptr @.str.58
  %217 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.55, ptr noundef nonnull %spec.select135) #14
  br label %218

218:                                              ; preds = %210, %215
  %219 = icmp sgt i32 %.094.lcssa, 1
  br i1 %219, label %220, label %228

220:                                              ; preds = %218
  %221 = load ptr, ptr @stdout, align 8, !tbaa !9
  %222 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %221, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.59) #14
  %223 = load ptr, ptr @stdout, align 8, !tbaa !9
  %224 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %223, ptr noundef nonnull @.str.15) #14
  %225 = load ptr, ptr @stdout, align 8, !tbaa !9
  %226 = load ptr, ptr %3, align 8, !tbaa !9
  %227 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %225, ptr noundef nonnull @.str.60, i32 noundef %.094.lcssa, ptr noundef %226) #14
  br label %240

228:                                              ; preds = %218
  %229 = icmp eq i32 %.094.lcssa, 1
  %230 = load ptr, ptr @stdout, align 8, !tbaa !9
  %231 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %230, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.59) #14
  %232 = load ptr, ptr @stdout, align 8, !tbaa !9
  %233 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %232, ptr noundef nonnull @.str.15) #14
  %234 = load ptr, ptr @stdout, align 8, !tbaa !9
  %235 = load ptr, ptr %3, align 8, !tbaa !9
  br i1 %229, label %236, label %238

236:                                              ; preds = %228
  %237 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %234, ptr noundef nonnull @.str.61, ptr noundef %235) #14
  br label %240

238:                                              ; preds = %228
  %239 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %234, ptr noundef nonnull @.str.62, ptr noundef %235) #14
  br label %240

240:                                              ; preds = %236, %238, %220
  %241 = load ptr, ptr @stdout, align 8, !tbaa !9
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef nonnull @.str.17) #14
  %243 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 40), align 8, !tbaa !45
  %244 = icmp ne ptr %243, null
  %245 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 48), align 8
  %246 = icmp ne ptr %245, null
  %or.cond9 = select i1 %244, i1 true, i1 %246
  br i1 %or.cond9, label %247, label %249

247:                                              ; preds = %240
  %248 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %248) #14
  br label %249

249:                                              ; preds = %240, %247
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #14
  br label %250

250:                                              ; preds = %202, %249, %208, %99, %7
  %.0 = phi i32 [ %10, %7 ], [ 1, %99 ], [ 0, %208 ], [ 0, %249 ], [ %.2, %202 ]
  ret i32 %.0
}

; Function Attrs: nounwind
declare ptr @getcwd(ptr noundef, i64 noundef) local_unnamed_addr #9

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #10

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @setopt_dir(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_prefix(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_quiet(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_global(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_clean(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_test(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_dev(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_force(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setopt_skip_cache(ptr noundef) #0

declare void @command_parse(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @curl_global_init(i64 noundef) local_unnamed_addr #2

declare i32 @clib_cache_init(i64 noundef) local_unnamed_addr #2

declare ptr @fs_stat(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @kh_destroy_ptr(ptr noundef) local_unnamed_addr #12

declare void @command_free(ptr noundef) local_unnamed_addr #2

declare void @curl_global_cleanup() local_unnamed_addr #2

declare void @clib_package_cleanup(...) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @kh_init_ptr() local_unnamed_addr #12

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

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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #12 = { inlinehint 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 #13 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #14 = { nounwind }
attributes #15 = { nounwind willreturn memory(none) }
attributes #16 = { nounwind willreturn memory(read) }
attributes #17 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"command", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !7, i64 48, !6, i64 1840, !7, i64 1848, !10, i64 2104}
!13 = !{!14, !10, i64 0}
!14 = !{!"options", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !10, i64 40, !10, i64 48}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!14, !6, i64 20}
!18 = !{!19, !10, i64 112}
!19 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !6, i64 152}
!20 = !{!14, !10, i64 8}
!21 = !{!12, !6, i64 1840}
!22 = !{!12, !10, i64 2104}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}
!26 = !{!14, !6, i64 28}
!27 = !{!28, !6, i64 0}
!28 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!29 = !{!28, !10, i64 16}
!30 = !{!14, !6, i64 32}
!31 = !{!28, !6, i64 8}
!32 = !{!14, !6, i64 16}
!33 = !{!28, !6, i64 4}
!34 = !{!35, !6, i64 24}
!35 = !{!"stat", !36, i64 0, !36, i64 8, !36, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !36, i64 40, !36, i64 48, !36, i64 56, !36, i64 64, !37, i64 72, !37, i64 88, !37, i64 104, !7, i64 120}
!36 = !{!"long", !7, i64 0}
!37 = !{!"timespec", !36, i64 0, !36, i64 8}
!38 = distinct !{!38, !16}
!39 = !{!40, !6, i64 0}
!40 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32}
!41 = !{!40, !10, i64 16}
!42 = !{!40, !10, i64 24}
!43 = !{!40, !10, i64 32}
!44 = distinct !{!44, !16}
!45 = !{!14, !10, i64 40}


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