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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.clib_package_opts_t = type { i32, i32, i32, ptr, i32, ptr }
%struct.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, 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
@configured = 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
@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 [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [28 x i8], align 1
@stderr = external global ptr, align 8
@.str.40 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @configure_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

; 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 void @hash_set(ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @configure_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 i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = 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
  %36 = load i64, ptr %7, align 8, !tbaa !11
  %37 = call ptr @llvm.stacksave.p0()
  store ptr %37, ptr %8, align 8
  %38 = alloca i8, i64 %36, align 16
  store i64 %36, ptr %9, align 8
  %39 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %38, i8 0, i64 %39, i1 false)
  %40 = load i64, ptr %7, align 8, !tbaa !11
  %41 = call ptr @getcwd(ptr noundef %38, i64 noundef %40) #11
  %42 = icmp eq ptr null, %41
  br i1 %42, label %43, label %47

43:                                               ; preds = %2
  %44 = call ptr @__errno_location() #12
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sub nsw i32 0, %45
  store i32 %46, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %416

47:                                               ; preds = %2
  %48 = call ptr @kh_init_ptr()
  store ptr %48, ptr @configured, align 8, !tbaa !9
  %49 = load ptr, ptr @configured, align 8, !tbaa !9
  %50 = call noalias ptr @strdup(ptr noundef @.str.15) #11
  call void @hash_set(ptr noundef %49, ptr noundef %50, ptr noundef @.str.16)
  call void @command_init(ptr noundef @program, ptr noundef @.str.17, ptr noundef @.str.16)
  %51 = call i32 @debug_init(ptr noundef @debugger, ptr noundef @.str.17)
  store ptr @.str.18, 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.19, ptr noundef @.str.20, ptr noundef @.str.21, ptr noundef @setopt_dir)
  call void @command_option(ptr noundef @program, ptr noundef @.str.22, ptr noundef @.str.23, ptr noundef @.str.24, ptr noundef @setopt_prefix)
  call void @command_option(ptr noundef @program, ptr noundef @.str.25, ptr noundef @.str.26, ptr noundef @.str.27, ptr noundef @setopt_quiet)
  call void @command_option(ptr noundef @program, ptr noundef @.str.28, ptr noundef @.str.29, ptr noundef @.str.30, ptr noundef @setopt_dev)
  call void @command_option(ptr noundef @program, ptr noundef @.str.31, ptr noundef @.str.32, ptr noundef @.str.33, ptr noundef @setopt_force)
  call void @command_option(ptr noundef @program, ptr noundef @.str.34, ptr noundef @.str.35, ptr noundef @.str.36, ptr noundef @setopt_flags)
  call void @command_option(ptr noundef @program, ptr noundef @.str.37, ptr noundef @.str.38, ptr noundef @.str.39, ptr noundef @setopt_skip_cache)
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  call void @command_parse(ptr noundef @program, i32 noundef %52, ptr noundef %53)
  %54 = load ptr, ptr @opts, align 8, !tbaa !15
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %72

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

72:                                               ; preds = %56, %47
  %73 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %91

75:                                               ; preds = %72
  %76 = load i64, ptr %7, align 8, !tbaa !11
  %77 = call ptr @llvm.stacksave.p0()
  store ptr %77, ptr %14, align 8
  %78 = alloca i8, i64 %76, align 16
  store i64 %76, ptr %15, align 8
  %79 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %78, i8 0, i64 %79, i1 false)
  %80 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  %81 = call ptr @realpath(ptr noundef %80, ptr noundef %78) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #11
  %82 = call i64 @strlen(ptr noundef %78) #13
  %83 = add i64 %82, 1
  store i64 %83, ptr %16, align 8, !tbaa !11
  %84 = load i64, ptr %16, align 8, !tbaa !11
  %85 = call noalias ptr @malloc(i64 noundef %84) #14
  store ptr %85, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  %86 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  %87 = load i64, ptr %16, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %86, i8 0, i64 %87, i1 false)
  %88 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  %89 = load i64, ptr %16, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %88, ptr align 16 %78, i64 %89, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #11
  %90 = load ptr, ptr %14, align 8
  call void @llvm.stackrestore.p0(ptr %90)
  br label %91

91:                                               ; preds = %75, %72
  %92 = load i32, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 7), align 8, !tbaa !18
  store i32 %92, ptr @rest_offset, align 4, !tbaa !5
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %95, label %143

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #11
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %134, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #11
  %97 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !19
  %98 = load i32, ptr %18, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %97, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  store ptr %101, ptr %19, align 8, !tbaa !9
  %102 = load ptr, ptr %19, align 8, !tbaa !9
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %123

104:                                              ; preds = %96
  %105 = load ptr, ptr %19, align 8, !tbaa !9
  %106 = getelementptr inbounds i8, ptr %105, i64 0
  %107 = load i8, ptr %106, align 1, !tbaa !20
  %108 = sext i8 %107 to i32
  %109 = icmp eq i32 45, %108
  br i1 %109, label %110, label %123

110:                                              ; preds = %104
  %111 = load ptr, ptr %19, align 8, !tbaa !9
  %112 = getelementptr inbounds i8, ptr %111, i64 1
  %113 = load i8, ptr %112, align 1, !tbaa !20
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 45, %114
  br i1 %115, label %116, label %123

116:                                              ; preds = %110
  %117 = load ptr, ptr %19, align 8, !tbaa !9
  %118 = call i64 @strlen(ptr noundef %117) #13
  %119 = icmp eq i64 2, %118
  br i1 %119, label %120, label %123

120:                                              ; preds = %116
  store i32 1, ptr %17, align 4, !tbaa !5
  %121 = load i32, ptr %18, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr @rest_offset, align 4, !tbaa !5
  br label %133

123:                                              ; preds = %116, %110, %104, %96
  %124 = load ptr, ptr %19, align 8, !tbaa !9
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %132

126:                                              ; preds = %123
  %127 = load i32, ptr %17, align 4, !tbaa !5
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %132

129:                                              ; preds = %126
  %130 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr @rest_argc, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %129, %126, %123
  br label %133

133:                                              ; preds = %132, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !19
  %136 = load i32, ptr %18, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %18, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds ptr, ptr %135, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !9
  %141 = icmp ne ptr %140, null
  br i1 %141, label %96, label %142, !llvm.loop !21

142:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  br label %143

143:                                              ; preds = %142, %91
  %144 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %146, label %176

146:                                              ; preds = %143
  %147 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = mul i64 %148, 8
  %150 = call noalias ptr @malloc(i64 noundef %149) #14
  store ptr %150, ptr @rest_argv, align 8, !tbaa !9
  %151 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  %152 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = mul i64 %153, 8
  call void @llvm.memset.p0.i64(ptr align 8 %151, i8 0, i64 %154, i1 false)
  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
  %155 = load i32, ptr @rest_offset, align 4, !tbaa !5
  store i32 %155, ptr %21, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %168, %146
  %157 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !19
  %158 = load i32, ptr %21, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %21, align 4, !tbaa !5
  %160 = sext i32 %158 to i64
  %161 = getelementptr inbounds ptr, ptr %157, i64 %160
  %162 = load ptr, ptr %161, align 8, !tbaa !9
  %163 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  %164 = load i32, ptr %20, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %20, align 4, !tbaa !5
  %166 = sext i32 %164 to i64
  %167 = getelementptr inbounds ptr, ptr %163, i64 %166
  store ptr %162, ptr %167, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %156
  %169 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !19
  %170 = load i32, ptr %21, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds ptr, ptr %169, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !9
  %174 = icmp ne ptr %173, null
  br i1 %174, label %156, label %175, !llvm.loop !23

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

176:                                              ; preds = %175, %143
  %177 = call i32 @curl_global_init(i64 noundef 3)
  %178 = icmp ne i32 0, %177
  br i1 %178, label %179, label %189

179:                                              ; preds = %176
  %180 = load ptr, ptr @stderr, align 8, !tbaa !9
  %181 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %180, ptr noundef @.str.7, ptr noundef @.str.40)
  %182 = load ptr, ptr @stderr, align 8, !tbaa !9
  %183 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %182, ptr noundef @.str.9) #11
  %184 = load ptr, ptr @stderr, align 8, !tbaa !9
  %185 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %184, ptr noundef @.str.41)
  %186 = load ptr, ptr @stderr, align 8, !tbaa !9
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %186, ptr noundef @.str.11) #11
  store i32 %187, ptr %22, align 4, !tbaa !5
  %188 = load i32, ptr %22, align 4, !tbaa !5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %416

189:                                              ; preds = %176
  %190 = call i32 @clib_cache_init(i64 noundef 2592000)
  %191 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 5), align 4, !tbaa !24
  store i32 %191, ptr @package_opts, align 8, !tbaa !25
  %192 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  store ptr %192, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 3), align 8, !tbaa !27
  %193 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 7), align 4, !tbaa !28
  store i32 %193, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 2), align 8, !tbaa !29
  %194 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 2), align 8, !tbaa !30
  store i32 %194, ptr getelementptr inbounds (%struct.clib_package_opts_t, ptr @package_opts, i32 0, i32 1), align 4, !tbaa !31
  call void @clib_package_set_opts(ptr noundef byval(%struct.clib_package_opts_t) align 8 @package_opts)
  %195 = load i32, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 7), align 8, !tbaa !18
  %196 = icmp eq i32 0, %195
  br i1 %196, label %203, label %197

197:                                              ; preds = %189
  %198 = load i32, ptr %4, align 4, !tbaa !5
  %199 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %200 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %201 = add nsw i32 %199, %200
  %202 = icmp eq i32 %198, %201
  br i1 %202, label %203, label %205

203:                                              ; preds = %197, %189
  %204 = call i32 @configure_package(ptr noundef %38)
  store i32 %204, ptr %6, align 4, !tbaa !5
  br label %290

205:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %286, %205
  %207 = load i32, ptr %23, align 4, !tbaa !5
  %208 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %209 = icmp sle i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  store i32 6, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %289

211:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #11
  %212 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !19
  %213 = load i32, ptr %23, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds ptr, ptr %212, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !9
  store ptr %216, ptr %24, align 8, !tbaa !9
  %217 = load ptr, ptr %24, align 8, !tbaa !9
  %218 = getelementptr inbounds i8, ptr %217, i64 0
  %219 = load i8, ptr %218, align 1, !tbaa !20
  %220 = sext i8 %219 to i32
  %221 = icmp eq i32 46, %220
  br i1 %221, label %222, label %230

222:                                              ; preds = %211
  %223 = load i64, ptr %7, align 8, !tbaa !11
  %224 = call ptr @llvm.stacksave.p0()
  store ptr %224, ptr %25, align 8
  %225 = alloca i8, i64 %223, align 16
  store i64 %223, ptr %26, align 8
  %226 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 %225, i8 0, i64 %226, i1 false)
  %227 = load ptr, ptr %24, align 8, !tbaa !9
  %228 = call ptr @realpath(ptr noundef %227, ptr noundef %225) #11
  store ptr %228, ptr %24, align 8, !tbaa !9
  %229 = load ptr, ptr %25, align 8
  call void @llvm.stackrestore.p0(ptr %229)
  br label %242

230:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #11
  %231 = load ptr, ptr %24, align 8, !tbaa !9
  %232 = call ptr @fs_stat(ptr noundef %231)
  store ptr %232, ptr %27, align 8, !tbaa !9
  %233 = load ptr, ptr %27, align 8, !tbaa !9
  %234 = icmp ne ptr %233, null
  br i1 %234, label %239, label %235

235:                                              ; preds = %230
  %236 = load ptr, ptr @opts, align 8, !tbaa !15
  %237 = load ptr, ptr %24, align 8, !tbaa !9
  %238 = call ptr @path_join(ptr noundef %236, ptr noundef %237)
  store ptr %238, ptr %24, align 8, !tbaa !9
  br label %241

239:                                              ; preds = %230
  %240 = load ptr, ptr %27, align 8, !tbaa !9
  call void @free(ptr noundef %240) #11
  br label %241

241:                                              ; preds = %239, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  br label %242

242:                                              ; preds = %241, %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #11
  %243 = load ptr, ptr %24, align 8, !tbaa !9
  %244 = call ptr @fs_stat(ptr noundef %243)
  store ptr %244, ptr %28, align 8, !tbaa !9
  %245 = load ptr, ptr %28, align 8, !tbaa !9
  %246 = icmp ne ptr %245, null
  br i1 %246, label %247, label %267

247:                                              ; preds = %242
  %248 = load ptr, ptr %28, align 8, !tbaa !9
  %249 = getelementptr inbounds %struct.stat, ptr %248, i32 0, i32 3
  %250 = load i32, ptr %249, align 8, !tbaa !32
  %251 = and i32 %250, 61440
  %252 = icmp eq i32 32768, %251
  br i1 %252, label %259, label %253

253:                                              ; preds = %247
  %254 = load ptr, ptr %28, align 8, !tbaa !9
  %255 = getelementptr inbounds %struct.stat, ptr %254, i32 0, i32 3
  %256 = load i32, ptr %255, align 8, !tbaa !32
  %257 = and i32 %256, 61440
  %258 = icmp eq i32 40960, %257
  br i1 %258, label %259, label %267

259:                                              ; preds = %253, %247
  %260 = load ptr, ptr %24, align 8, !tbaa !9
  %261 = call ptr @__xpg_basename(ptr noundef %260) #11
  store ptr %261, ptr %24, align 8, !tbaa !9
  %262 = load ptr, ptr %24, align 8, !tbaa !9
  %263 = call ptr @dirname(ptr noundef %262) #11
  %264 = load ptr, ptr %24, align 8, !tbaa !9
  %265 = call ptr @__xpg_basename(ptr noundef %264) #11
  %266 = call i32 @configure_package_with_manifest_name(ptr noundef %263, ptr noundef %265)
  store i32 %266, ptr %6, align 4, !tbaa !5
  br label %280

267:                                              ; preds = %253, %242
  %268 = load ptr, ptr %24, align 8, !tbaa !9
  %269 = call i32 @configure_package(ptr noundef %268)
  store i32 %269, ptr %6, align 4, !tbaa !5
  %270 = load i32, ptr %6, align 4, !tbaa !5
  %271 = icmp ne i32 0, %270
  br i1 %271, label %272, label %279

272:                                              ; preds = %267
  %273 = load ptr, ptr getelementptr inbounds (%struct.command, ptr @program, i32 0, i32 9), align 8, !tbaa !19
  %274 = load i32, ptr %23, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds ptr, ptr %273, i64 %275
  %277 = load ptr, ptr %276, align 8, !tbaa !9
  %278 = call i32 @configure_package(ptr noundef %277)
  store i32 %278, ptr %6, align 4, !tbaa !5
  br label %279

279:                                              ; preds = %272, %267
  br label %280

280:                                              ; preds = %279, %259
  %281 = load ptr, ptr %28, align 8, !tbaa !9
  %282 = icmp ne ptr %281, null
  br i1 %282, label %283, label %285

283:                                              ; preds = %280
  %284 = load ptr, ptr %28, align 8, !tbaa !9
  call void @free(ptr noundef %284) #11
  store ptr null, ptr %28, align 8, !tbaa !9
  br label %285

285:                                              ; preds = %283, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  br label %286

286:                                              ; preds = %285
  %287 = load i32, ptr %23, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %23, align 4, !tbaa !5
  br label %206, !llvm.loop !35

289:                                              ; preds = %210
  br label %290

290:                                              ; preds = %289, %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  store i32 0, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #11
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %291

291:                                              ; preds = %341, %290
  %292 = load i32, ptr %32, align 4, !tbaa !5
  %293 = load ptr, ptr @configured, align 8, !tbaa !9
  %294 = getelementptr inbounds %struct.kh_ptr_t, ptr %293, i32 0, i32 0
  %295 = load i32, ptr %294, align 8, !tbaa !36
  %296 = icmp ult i32 %292, %295
  br i1 %296, label %298, label %297

297:                                              ; preds = %291
  store i32 9, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  br label %344

298:                                              ; preds = %291
  %299 = load ptr, ptr @configured, align 8, !tbaa !9
  %300 = getelementptr inbounds %struct.kh_ptr_t, ptr %299, i32 0, i32 4
  %301 = load ptr, ptr %300, align 8, !tbaa !38
  %302 = load i32, ptr %32, align 4, !tbaa !5
  %303 = lshr i32 %302, 4
  %304 = zext i32 %303 to i64
  %305 = getelementptr inbounds i32, ptr %301, i64 %304
  %306 = load i32, ptr %305, align 4, !tbaa !5
  %307 = load i32, ptr %32, align 4, !tbaa !5
  %308 = and i32 %307, 15
  %309 = shl i32 %308, 1
  %310 = lshr i32 %306, %309
  %311 = and i32 %310, 3
  %312 = icmp ne i32 %311, 0
  br i1 %312, label %313, label %314

313:                                              ; preds = %298
  br label %341

314:                                              ; preds = %298
  %315 = load ptr, ptr @configured, align 8, !tbaa !9
  %316 = getelementptr inbounds %struct.kh_ptr_t, ptr %315, i32 0, i32 5
  %317 = load ptr, ptr %316, align 8, !tbaa !39
  %318 = load i32, ptr %32, align 4, !tbaa !5
  %319 = zext i32 %318 to i64
  %320 = getelementptr inbounds ptr, ptr %317, i64 %319
  %321 = load ptr, ptr %320, align 8, !tbaa !9
  store ptr %321, ptr %30, align 8, !tbaa !9
  %322 = load ptr, ptr @configured, align 8, !tbaa !9
  %323 = getelementptr inbounds %struct.kh_ptr_t, ptr %322, i32 0, i32 6
  %324 = load ptr, ptr %323, align 8, !tbaa !40
  %325 = load i32, ptr %32, align 4, !tbaa !5
  %326 = zext i32 %325 to i64
  %327 = getelementptr inbounds ptr, ptr %324, i64 %326
  %328 = load ptr, ptr %327, align 8, !tbaa !9
  store ptr %328, ptr %31, align 8, !tbaa !9
  %329 = load ptr, ptr %31, align 8, !tbaa !9
  %330 = call i32 @strncmp(ptr noundef @.str.2, ptr noundef %329, i64 noundef 1) #13
  %331 = icmp eq i32 0, %330
  br i1 %331, label %332, label %335

332:                                              ; preds = %314
  %333 = load i32, ptr %29, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %29, align 4, !tbaa !5
  br label %335

335:                                              ; preds = %332, %314
  %336 = load ptr, ptr %30, align 8, !tbaa !9
  %337 = icmp ne ptr null, %336
  br i1 %337, label %338, label %340

338:                                              ; preds = %335
  %339 = load ptr, ptr %30, align 8, !tbaa !9
  call void @free(ptr noundef %339) #11
  br label %340

340:                                              ; preds = %338, %335
  br label %341

341:                                              ; preds = %340, %313
  %342 = load i32, ptr %32, align 4, !tbaa !5
  %343 = add i32 %342, 1
  store i32 %343, ptr %32, align 4, !tbaa !5
  br label %291, !llvm.loop !41

344:                                              ; preds = %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #11
  %345 = load ptr, ptr @configured, align 8, !tbaa !9
  call void @kh_destroy_ptr(ptr noundef %345)
  call void @command_free(ptr noundef @program)
  call void @curl_global_cleanup()
  call void (...) @clib_package_cleanup()
  %346 = load ptr, ptr @opts, align 8, !tbaa !15
  %347 = icmp ne ptr %346, null
  br i1 %347, label %348, label %350

348:                                              ; preds = %344
  %349 = load ptr, ptr @opts, align 8, !tbaa !15
  call void @free(ptr noundef %349) #11
  br label %350

350:                                              ; preds = %348, %344
  %351 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  %352 = icmp ne ptr %351, null
  br i1 %352, label %353, label %355

353:                                              ; preds = %350
  %354 = load ptr, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 1), align 8, !tbaa !17
  call void @free(ptr noundef %354) #11
  br label %355

355:                                              ; preds = %353, %350
  %356 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %357 = icmp sgt i32 %356, 0
  br i1 %357, label %358, label %360

358:                                              ; preds = %355
  %359 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  call void @free(ptr noundef %359) #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 %360

360:                                              ; preds = %358, %355
  %361 = load i32, ptr %6, align 4, !tbaa !5
  %362 = icmp eq i32 0, %361
  br i1 %362, label %363, label %414

363:                                              ; preds = %360
  %364 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 6), align 8, !tbaa !42
  %365 = icmp ne i32 %364, 0
  br i1 %365, label %366, label %371

366:                                              ; preds = %363
  %367 = load i32, ptr %29, align 4, !tbaa !5
  %368 = icmp sgt i32 %367, 0
  br i1 %368, label %369, label %371

369:                                              ; preds = %366
  %370 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  br label %371

371:                                              ; preds = %369, %366, %363
  %372 = load i32, ptr getelementptr inbounds (%struct.options, ptr @opts, i32 0, i32 3), align 4, !tbaa !43
  %373 = icmp ne i32 %372, 0
  br i1 %373, label %374, label %413

374:                                              ; preds = %371
  %375 = load i32, ptr %29, align 4, !tbaa !5
  %376 = icmp sgt i32 %375, 1
  br i1 %376, label %377, label %388

377:                                              ; preds = %374
  %378 = load ptr, ptr @stdout, align 8, !tbaa !9
  %379 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %378, ptr noundef @.str.7, ptr noundef @.str.42)
  %380 = load ptr, ptr @stdout, align 8, !tbaa !9
  %381 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %380, ptr noundef @.str.9) #11
  %382 = load ptr, ptr @stdout, align 8, !tbaa !9
  %383 = load i32, ptr %29, align 4, !tbaa !5
  %384 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %382, ptr noundef @.str.43, i32 noundef %383)
  %385 = load ptr, ptr @stdout, align 8, !tbaa !9
  %386 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %385, ptr noundef @.str.11) #11
  store i32 %386, ptr %33, align 4, !tbaa !5
  %387 = load i32, ptr %33, align 4, !tbaa !5
  br label %412

388:                                              ; preds = %374
  %389 = load i32, ptr %29, align 4, !tbaa !5
  %390 = icmp eq i32 1, %389
  br i1 %390, label %391, label %401

391:                                              ; preds = %388
  %392 = load ptr, ptr @stdout, align 8, !tbaa !9
  %393 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %392, ptr noundef @.str.7, ptr noundef @.str.42)
  %394 = load ptr, ptr @stdout, align 8, !tbaa !9
  %395 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %394, ptr noundef @.str.9) #11
  %396 = load ptr, ptr @stdout, align 8, !tbaa !9
  %397 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %396, ptr noundef @.str.44)
  %398 = load ptr, ptr @stdout, align 8, !tbaa !9
  %399 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %398, ptr noundef @.str.11) #11
  store i32 %399, ptr %34, align 4, !tbaa !5
  %400 = load i32, ptr %34, align 4, !tbaa !5
  br label %411

401:                                              ; preds = %388
  %402 = load ptr, ptr @stdout, align 8, !tbaa !9
  %403 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %402, ptr noundef @.str.7, ptr noundef @.str.42)
  %404 = load ptr, ptr @stdout, align 8, !tbaa !9
  %405 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %404, ptr noundef @.str.9) #11
  %406 = load ptr, ptr @stdout, align 8, !tbaa !9
  %407 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %406, ptr noundef @.str.45)
  %408 = load ptr, ptr @stdout, align 8, !tbaa !9
  %409 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %408, ptr noundef @.str.11) #11
  store i32 %409, ptr %35, align 4, !tbaa !5
  %410 = load i32, ptr %35, align 4, !tbaa !5
  br label %411

411:                                              ; preds = %401, %391
  br label %412

412:                                              ; preds = %411, %377
  br label %413

413:                                              ; preds = %412, %371
  br label %414

414:                                              ; preds = %413, %360
  %415 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %415, ptr %3, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  br label %416

416:                                              ; preds = %414, %179, %43
  %417 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %417)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  %418 = load i32, ptr %3, align 4
  ret i32 %418
}

; 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_dev(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @setopt_flags(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 @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, !6, i64 36}
!17 = !{!16, !10, i64 8}
!18 = !{!14, !6, i64 1840}
!19 = !{!14, !10, i64 2104}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!16, !6, i64 28}
!25 = !{!26, !6, i64 0}
!26 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!27 = !{!26, !10, i64 16}
!28 = !{!16, !6, i64 36}
!29 = !{!26, !6, i64 8}
!30 = !{!16, !6, i64 16}
!31 = !{!26, !6, i64 4}
!32 = !{!33, !6, i64 24}
!33 = !{!"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, !34, i64 72, !34, i64 88, !34, i64 104, !7, i64 120}
!34 = !{!"timespec", !12, i64 0, !12, i64 8}
!35 = distinct !{!35, !22}
!36 = !{!37, !6, i64 0}
!37 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32}
!38 = !{!37, !10, i64 16}
!39 = !{!37, !10, i64 24}
!40 = !{!37, !10, i64 32}
!41 = distinct !{!41, !22}
!42 = !{!16, !6, i64 32}
!43 = !{!16, !6, i64 20}


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

%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, i32 }

@package_opts = external dso_local global %struct.clib_package_opts_t, align 8
@configured = 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
@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 [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [28 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.40 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @configure_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 [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %3, i8 0, i64 4096, i1 false)
  %4 = call ptr @getcwd(ptr noundef nonnull %3, i64 noundef 4096) #13
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %10

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

10:                                               ; preds = %2
  %11 = call ptr @kh_init_ptr()
  store ptr %11, ptr @configured, align 8, !tbaa !9
  %12 = call noalias ptr @strdup(ptr noundef nonnull @.str.15) #13
  call void @hash_set(ptr noundef %11, ptr noundef %12, ptr noundef nonnull @.str.16) #13
  call void @command_init(ptr noundef nonnull @program, ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.16) #13
  %13 = call i32 @debug_init(ptr noundef nonnull @debugger, ptr noundef nonnull @.str.17) #13
  store ptr @.str.18, ptr getelementptr inbounds (i8, ptr @program, i64 8), align 8, !tbaa !11
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.21, ptr noundef nonnull @setopt_dir) #13
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.24, ptr noundef nonnull @setopt_prefix) #13
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.27, ptr noundef nonnull @setopt_quiet) #13
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.30, ptr noundef nonnull @setopt_dev) #13
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.33, ptr noundef nonnull @setopt_force) #13
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.36, ptr noundef nonnull @setopt_flags) #13
  call void @command_option(ptr noundef nonnull @program, ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.39, ptr noundef nonnull @setopt_skip_cache) #13
  call void @command_parse(ptr noundef nonnull @program, i32 noundef %0, ptr noundef %1) #13
  %14 = load ptr, ptr @opts, align 8, !tbaa !13
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %22, label %15

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

22:                                               ; preds = %15, %10
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !15
  %.not102 = icmp eq ptr %23, null
  br i1 %.not102, label %31, label %24

24:                                               ; preds = %22
  %25 = call ptr @llvm.stacksave.p0()
  %26 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %26, i8 0, i64 4096, i1 false)
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !15
  %28 = call ptr @realpath(ptr noundef %27, ptr noundef nonnull %26) #13
  %29 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %26) #15
  %30 = add i64 %29, 1
  %calloc153 = call ptr @calloc(i64 1, i64 %30)
  store ptr %calloc153, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %calloc153, ptr nonnull align 16 %26, i64 %30, i1 false)
  call void @llvm.stackrestore.p0(ptr %25)
  br label %31

31:                                               ; preds = %24, %22
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @program, i64 1840), align 8, !tbaa !16
  store i32 %32, ptr @rest_offset, align 4, !tbaa !5
  %33 = icmp sgt i32 %0, 0
  br i1 %33, label %.preheader123, label %..loopexit124_crit_edge

..loopexit124_crit_edge:                          ; preds = %31
  %.pre148 = load i32, ptr @rest_argc, align 4, !tbaa !5
  br label %.loopexit124

.preheader123:                                    ; preds = %31
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !17
  %rest_argc.promoted = load i32, ptr @rest_argc, align 4, !tbaa !5
  %.pre = load ptr, ptr %34, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %.preheader123, %.thread
  %36 = phi i32 [ %32, %.preheader123 ], [ %55, %.thread ]
  %37 = phi ptr [ %.pre, %.preheader123 ], [ %58, %.thread ]
  %indvars.iv = phi i64 [ 0, %.preheader123 ], [ %indvars.iv.next, %.thread ]
  %38 = phi i32 [ %rest_argc.promoted, %.preheader123 ], [ %56, %.thread ]
  %.081 = phi i32 [ 0, %.preheader123 ], [ %.182, %.thread ]
  %.not120 = icmp eq ptr %37, null
  br i1 %.not120, label %.thread, label %39

39:                                               ; preds = %35
  %40 = load i8, ptr %37, align 1, !tbaa !18
  %41 = icmp eq i8 %40, 45
  br i1 %41, label %42, label %52

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %37, i64 1
  %44 = load i8, ptr %43, align 1, !tbaa !18
  %45 = icmp eq i8 %44, 45
  br i1 %45, label %46, label %52

46:                                               ; preds = %42
  %47 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %37) #15
  %48 = icmp eq i64 %47, 2
  br i1 %48, label %49, label %52

49:                                               ; preds = %46
  %50 = trunc i64 %indvars.iv to i32
  %51 = add i32 %50, 1
  store i32 %51, ptr @rest_offset, align 4, !tbaa !5
  br label %.thread

52:                                               ; preds = %46, %42, %39
  %.not121 = icmp eq i32 %.081, 0
  br i1 %.not121, label %.thread, label %53

53:                                               ; preds = %52
  %54 = add nsw i32 %38, 1
  store i32 %54, ptr @rest_argc, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %35, %52, %53, %49
  %55 = phi i32 [ %51, %49 ], [ %36, %53 ], [ %36, %52 ], [ %36, %35 ]
  %56 = phi i32 [ %38, %49 ], [ %54, %53 ], [ %38, %52 ], [ %38, %35 ]
  %.182 = phi i32 [ 1, %49 ], [ 1, %53 ], [ 0, %52 ], [ %.081, %35 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %57 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv.next
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %.not103 = icmp eq ptr %58, null
  br i1 %.not103, label %.loopexit124, label %35, !llvm.loop !19

.loopexit124:                                     ; preds = %.thread, %..loopexit124_crit_edge
  %59 = phi i32 [ %32, %..loopexit124_crit_edge ], [ %55, %.thread ]
  %60 = phi i32 [ %.pre148, %..loopexit124_crit_edge ], [ %56, %.thread ]
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %62, label %.loopexit122

62:                                               ; preds = %.loopexit124
  %63 = zext nneg i32 %60 to i64
  %64 = shl nuw nsw i64 %63, 3
  %calloc = call ptr @calloc(i64 1, i64 %64)
  store ptr %calloc, ptr @rest_argv, align 8, !tbaa !9
  %65 = sext i32 %59 to i64
  %.pre149 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !17
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre149, i64 %65
  %.pre150 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %66, %62
  %67 = phi ptr [ %72, %66 ], [ %.pre150, %62 ]
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %66 ], [ 0, %62 ]
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %66 ], [ %65, %62 ]
  %indvars.iv.next136 = add nsw i64 %indvars.iv135, 1
  %68 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %69 = getelementptr inbounds ptr, ptr %68, i64 %indvars.iv137
  store ptr %67, ptr %69, align 8, !tbaa !9
  %70 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !17
  %71 = getelementptr inbounds ptr, ptr %70, i64 %indvars.iv.next136
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %.not104 = icmp eq ptr %72, null
  br i1 %.not104, label %.loopexit122, label %66, !llvm.loop !21

.loopexit122:                                     ; preds = %66, %.loopexit124
  %73 = call i32 @curl_global_init(i64 noundef 3) #13
  %.not105 = icmp eq i32 %73, 0
  br i1 %.not105, label %83, label %74

74:                                               ; preds = %.loopexit122
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 2, ptr noundef %75, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.40) #13
  %77 = load ptr, ptr @stderr, align 8, !tbaa !9
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.9) #16
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %79, ptr noundef nonnull @.str.41) #13
  %81 = load ptr, ptr @stderr, align 8, !tbaa !9
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.11) #16
  br label %213

83:                                               ; preds = %.loopexit122
  %84 = call i32 @clib_cache_init(i64 noundef 2592000) #13
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 28), align 4, !tbaa !22
  store i32 %85, ptr @package_opts, align 8, !tbaa !23
  %86 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !15
  store ptr %86, ptr getelementptr inbounds (i8, ptr @package_opts, i64 16), align 8, !tbaa !25
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 36), align 4, !tbaa !26
  store i32 %87, ptr getelementptr inbounds (i8, ptr @package_opts, i64 8), align 8, !tbaa !27
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 16), align 8, !tbaa !28
  store i32 %88, ptr getelementptr inbounds (i8, ptr @package_opts, i64 4), align 4, !tbaa !29
  call void @clib_package_set_opts(ptr noundef nonnull byval(%struct.clib_package_opts_t) align 8 @package_opts) #13
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @program, i64 1840), align 8, !tbaa !16
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %96, label %91

91:                                               ; preds = %83
  %92 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %93 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %94 = add nsw i32 %93, %92
  %95 = icmp eq i32 %94, %0
  br i1 %95, label %96, label %.preheader

.preheader:                                       ; preds = %91
  %.not106125 = icmp slt i32 %92, 1
  br i1 %.not106125, label %.loopexit, label %.lr.ph

96:                                               ; preds = %91, %83
  %97 = call i32 @configure_package(ptr noundef nonnull %3)
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %132
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %132 ], [ 1, %.preheader ]
  %98 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !17
  %99 = getelementptr inbounds ptr, ptr %98, i64 %indvars.iv142
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = load i8, ptr %100, align 1, !tbaa !18
  %102 = icmp eq i8 %101, 46
  br i1 %102, label %103, label %107

103:                                              ; preds = %.lr.ph
  %104 = call ptr @llvm.stacksave.p0()
  %105 = alloca [4096 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %105, i8 0, i64 4096, i1 false)
  %106 = call ptr @realpath(ptr noundef nonnull %100, ptr noundef nonnull %105) #13
  call void @llvm.stackrestore.p0(ptr %104)
  br label %113

107:                                              ; preds = %.lr.ph
  %108 = call ptr @fs_stat(ptr noundef nonnull %100) #13
  %.not107 = icmp eq ptr %108, null
  br i1 %.not107, label %109, label %112

109:                                              ; preds = %107
  %110 = load ptr, ptr @opts, align 8, !tbaa !13
  %111 = call ptr @path_join(ptr noundef %110, ptr noundef nonnull %100) #13
  br label %113

112:                                              ; preds = %107
  call void @free(ptr noundef nonnull %108) #13
  br label %113

113:                                              ; preds = %109, %112, %103
  %.191 = phi ptr [ %106, %103 ], [ %100, %112 ], [ %111, %109 ]
  %114 = call ptr @fs_stat(ptr noundef %.191) #13
  %.not108 = icmp eq ptr %114, null
  br i1 %.not108, label %123, label %115

115:                                              ; preds = %113
  %116 = getelementptr inbounds i8, ptr %114, i64 24
  %117 = load i32, ptr %116, align 8, !tbaa !30
  %118 = trunc i32 %117 to i16
  %trunc = and i16 %118, -4096
  switch i16 %trunc, label %123 [
    i16 -32768, label %.thread116
    i16 -24576, label %.thread116
  ]

.thread116:                                       ; preds = %115, %115
  %119 = call ptr @__xpg_basename(ptr noundef %.191) #13
  %120 = call ptr @dirname(ptr noundef %119) #13
  %121 = call ptr @__xpg_basename(ptr noundef %119) #13
  %122 = call i32 @configure_package_with_manifest_name(ptr noundef %120, ptr noundef %121)
  br label %131

123:                                              ; preds = %115, %113
  %124 = call i32 @configure_package(ptr noundef %.191)
  %.not109 = icmp eq i32 %124, 0
  br i1 %.not109, label %130, label %125

125:                                              ; preds = %123
  %126 = load ptr, ptr getelementptr inbounds (i8, ptr @program, i64 2104), align 8, !tbaa !17
  %127 = getelementptr inbounds ptr, ptr %126, i64 %indvars.iv142
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = call i32 @configure_package(ptr noundef %128)
  br label %130

130:                                              ; preds = %123, %125
  %.1 = phi i32 [ %129, %125 ], [ 0, %123 ]
  br i1 %.not108, label %132, label %131

131:                                              ; preds = %.thread116, %130
  %.1118 = phi i32 [ %122, %.thread116 ], [ %.1, %130 ]
  call void @free(ptr noundef nonnull %114) #13
  br label %132

132:                                              ; preds = %131, %130
  %.1119 = phi i32 [ %.1118, %131 ], [ %.1, %130 ]
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %133 = load i32, ptr @rest_offset, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %.not106.not = icmp slt i64 %indvars.iv142, %134
  br i1 %.not106.not, label %.lr.ph, label %.loopexit, !llvm.loop !34

.loopexit:                                        ; preds = %132, %.preheader, %96
  %.2 = phi i32 [ %97, %96 ], [ 0, %.preheader ], [ %.1119, %132 ]
  %135 = load ptr, ptr @configured, align 8, !tbaa !9
  %136 = load i32, ptr %135, align 8, !tbaa !35
  %.not132 = icmp eq i32 %136, 0
  br i1 %.not132, label %._crit_edge, label %.lr.ph129

.lr.ph129:                                        ; preds = %.loopexit
  %lhsc = load i8, ptr @.str.2, align 1
  br label %138

._crit_edge:                                      ; preds = %163, %.loopexit
  %.084.lcssa = phi i32 [ 0, %.loopexit ], [ %.286, %163 ]
  %.lcssa = phi ptr [ %135, %.loopexit ], [ %165, %163 ]
  call void @kh_destroy_ptr(ptr noundef nonnull %.lcssa)
  call void @command_free(ptr noundef nonnull @program) #13
  call void @curl_global_cleanup() #13
  call void (...) @clib_package_cleanup() #13
  %137 = load ptr, ptr @opts, align 8, !tbaa !13
  %.not110 = icmp eq ptr %137, null
  br i1 %.not110, label %169, label %168

138:                                              ; preds = %.lr.ph129, %163
  %139 = phi i32 [ %136, %.lr.ph129 ], [ %164, %163 ]
  %140 = phi ptr [ %135, %.lr.ph129 ], [ %165, %163 ]
  %indvars.iv145 = phi i64 [ 0, %.lr.ph129 ], [ %indvars.iv.next146, %163 ]
  %.084127 = phi i32 [ 0, %.lr.ph129 ], [ %.286, %163 ]
  %141 = getelementptr inbounds i8, ptr %140, i64 16
  %142 = load ptr, ptr %141, align 8, !tbaa !37
  %143 = trunc nuw i64 %indvars.iv145 to i32
  %144 = lshr i64 %indvars.iv145, 4
  %145 = getelementptr inbounds i32, ptr %142, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = shl i32 %143, 1
  %148 = and i32 %147, 30
  %149 = shl nuw i32 3, %148
  %150 = and i32 %146, %149
  %.not113 = icmp eq i32 %150, 0
  br i1 %.not113, label %151, label %163

151:                                              ; preds = %138
  %152 = getelementptr inbounds i8, ptr %140, i64 24
  %153 = load ptr, ptr %152, align 8, !tbaa !38
  %154 = getelementptr inbounds ptr, ptr %153, i64 %indvars.iv145
  %155 = load ptr, ptr %154, align 8, !tbaa !9
  %156 = getelementptr inbounds i8, ptr %140, i64 32
  %157 = load ptr, ptr %156, align 8, !tbaa !39
  %158 = getelementptr inbounds ptr, ptr %157, i64 %indvars.iv145
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %rhsc = load i8, ptr %159, align 1
  %160 = icmp eq i8 %lhsc, %rhsc
  %161 = zext i1 %160 to i32
  %spec.select = add nsw i32 %.084127, %161
  %.not114 = icmp eq ptr %155, null
  br i1 %.not114, label %163, label %162

162:                                              ; preds = %151
  call void @free(ptr noundef nonnull %155) #13
  %.pre151 = load ptr, ptr @configured, align 8, !tbaa !9
  %.pre152 = load i32, ptr %.pre151, align 8, !tbaa !35
  br label %163

163:                                              ; preds = %151, %162, %138
  %164 = phi i32 [ %139, %138 ], [ %.pre152, %162 ], [ %139, %151 ]
  %165 = phi ptr [ %140, %138 ], [ %.pre151, %162 ], [ %140, %151 ]
  %.286 = phi i32 [ %.084127, %138 ], [ %spec.select, %162 ], [ %spec.select, %151 ]
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %166 = zext i32 %164 to i64
  %167 = icmp ult i64 %indvars.iv.next146, %166
  br i1 %167, label %138, label %._crit_edge, !llvm.loop !40

168:                                              ; preds = %._crit_edge
  call void @free(ptr noundef nonnull %137) #13
  br label %169

169:                                              ; preds = %168, %._crit_edge
  %170 = load ptr, ptr getelementptr inbounds (i8, ptr @opts, i64 8), align 8, !tbaa !15
  %.not111 = icmp eq ptr %170, null
  br i1 %.not111, label %172, label %171

171:                                              ; preds = %169
  call void @free(ptr noundef nonnull %170) #13
  br label %172

172:                                              ; preds = %171, %169
  %173 = load i32, ptr @rest_argc, align 4, !tbaa !5
  %174 = icmp sgt i32 %173, 0
  br i1 %174, label %175, label %177

175:                                              ; preds = %172
  %176 = load ptr, ptr @rest_argv, align 8, !tbaa !9
  call void @free(ptr noundef %176) #13
  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 %177

177:                                              ; preds = %175, %172
  %178 = icmp eq i32 %.2, 0
  br i1 %178, label %179, label %213

179:                                              ; preds = %177
  %180 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 32), align 8, !tbaa !41
  %181 = icmp ne i32 %180, 0
  %182 = icmp sgt i32 %.084.lcssa, 0
  %or.cond3 = select i1 %181, i1 %182, i1 false
  br i1 %or.cond3, label %183, label %185

183:                                              ; preds = %179
  %184 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %185

185:                                              ; preds = %183, %179
  %186 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 20), align 4, !tbaa !42
  %.not112 = icmp eq i32 %186, 0
  br i1 %.not112, label %213, label %187

187:                                              ; preds = %185
  %188 = icmp sgt i32 %.084.lcssa, 1
  br i1 %188, label %189, label %198

189:                                              ; preds = %187
  %190 = load ptr, ptr @stdout, align 8, !tbaa !9
  %191 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %190, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.42) #13
  %192 = load ptr, ptr @stdout, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef nonnull @.str.9) #13
  %194 = load ptr, ptr @stdout, align 8, !tbaa !9
  %195 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %194, ptr noundef nonnull @.str.43, i32 noundef %.084.lcssa) #13
  %196 = load ptr, ptr @stdout, align 8, !tbaa !9
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %196, ptr noundef nonnull @.str.11) #13
  br label %213

198:                                              ; preds = %187
  %199 = icmp eq i32 %.084.lcssa, 1
  %200 = load ptr, ptr @stdout, align 8, !tbaa !9
  %201 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 15, ptr noundef %200, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.42) #13
  %202 = load ptr, ptr @stdout, align 8, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef nonnull @.str.9) #13
  %204 = load ptr, ptr @stdout, align 8, !tbaa !9
  br i1 %199, label %205, label %209

205:                                              ; preds = %198
  %206 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %204, ptr noundef nonnull @.str.44) #13
  %207 = load ptr, ptr @stdout, align 8, !tbaa !9
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef nonnull @.str.11) #13
  br label %213

209:                                              ; preds = %198
  %210 = call i32 (i32, ptr, ptr, ...) @cc_fprintf(i32 noundef 9, ptr noundef %204, ptr noundef nonnull @.str.45) #13
  %211 = load ptr, ptr @stdout, align 8, !tbaa !9
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef nonnull @.str.11) #13
  br label %213

213:                                              ; preds = %177, %189, %209, %205, %185, %74, %6
  %.0 = phi i32 [ %9, %6 ], [ 1, %74 ], [ 0, %185 ], [ 0, %205 ], [ 0, %209 ], [ 0, %189 ], [ %.2, %177 ]
  ret i32 %.0
}

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

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

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

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

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

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

; 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_dev(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @setopt_flags(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 #1

declare i32 @curl_global_init(i64 noundef) local_unnamed_addr #1

declare i32 @clib_cache_init(i64 noundef) local_unnamed_addr #1

declare ptr @fs_stat(ptr noundef) local_unnamed_addr #1

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

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

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

declare void @command_free(ptr noundef) local_unnamed_addr #1

declare void @curl_global_cleanup() local_unnamed_addr #1

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { 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 #10 = { 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 #11 = { 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 #12 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #13 = { nounwind }
attributes #14 = { nounwind willreturn memory(none) }
attributes #15 = { nounwind willreturn memory(read) }
attributes #16 = { 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, !6, i64 36}
!15 = !{!14, !10, i64 8}
!16 = !{!12, !6, i64 1840}
!17 = !{!12, !10, i64 2104}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!14, !6, i64 28}
!23 = !{!24, !6, i64 0}
!24 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!25 = !{!24, !10, i64 16}
!26 = !{!14, !6, i64 36}
!27 = !{!24, !6, i64 8}
!28 = !{!14, !6, i64 16}
!29 = !{!24, !6, i64 4}
!30 = !{!31, !6, i64 24}
!31 = !{!"stat", !32, i64 0, !32, i64 8, !32, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !32, i64 40, !32, i64 48, !32, i64 56, !32, i64 64, !33, i64 72, !33, i64 88, !33, i64 104, !7, i64 120}
!32 = !{!"long", !7, i64 0}
!33 = !{!"timespec", !32, i64 0, !32, i64 8}
!34 = distinct !{!34, !20}
!35 = !{!36, !6, i64 0}
!36 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32}
!37 = !{!36, !10, i64 16}
!38 = !{!36, !10, i64 24}
!39 = !{!36, !10, i64 32}
!40 = distinct !{!40, !20}
!41 = !{!14, !6, i64 32}
!42 = !{!14, !6, i64 20}


; 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