; LLVM IR from christoskaramou/PhasmaEngine :: PhasmaEditor/Include/TinyFileDialogs (tinyfiledialogs)

; 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"

@tinyfd_verbose = external dso_local global i32, align 4
@tinyfd_silent = external dso_local global i32, align 4
@tinyfd_response = external dso_local global [1024 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL12gPython2Name = external hidden global [16 x i8], align 16
@.str.74 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [120 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL12gPython3Name = external hidden global [16 x i8], align 16
@.str.120 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.257 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.258 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.261 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.263 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.266 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.268 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.285 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.286 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZZ25tinyfd_selectFolderDialogE5lBuff = external hidden global [1024 x i8], align 16
@.str.313 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.317 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.318 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.319 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.320 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL16osascriptPresentv() #3

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

declare noalias ptr @popen(ptr noundef, ptr noundef) #4

declare i32 @pclose(ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12osx9orBetterv() #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14kdialogPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13zenityPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17matedialogPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL20shellementaryPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12qarmaPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14zenity3Presentv() #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14gdialogPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14xdialogPresentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15tkinter2Presentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17isTerminalRunningv() #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL8isDarwinv() #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15tkinter3Presentv() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10dialogNamev() #3

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL12terminalNamev() #3

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local ptr @tinyfd_inputBox(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL9dirExistsPKc(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local ptr @tinyfd_selectFolderDialog(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1024 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  store i8 0, ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, align 16, !tbaa !11
  %12 = call noundef i32 @_ZL16osascriptPresentv()
  %13 = icmp ne i32 %12, 0
  br i1 %13, label %14, label %76

14:                                               ; preds = %2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %23

17:                                               ; preds = %14
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call i32 @strcmp(ptr noundef %18, ptr noundef @.str.10) #7
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %23, label %21

21:                                               ; preds = %17
  %22 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.11) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

23:                                               ; preds = %17, %14
  %24 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %25 = call ptr @strcpy(ptr noundef %24, ptr noundef @.str.12) #6
  %26 = call noundef i32 @_ZL12osx9orBetterv()
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %31, label %28

28:                                               ; preds = %23
  %29 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %30 = call ptr @strcat(ptr noundef %29, ptr noundef @.str.13) #6
  br label %31

31:                                               ; preds = %28, %23
  %32 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %33 = call ptr @strcat(ptr noundef %32, ptr noundef @.str.313) #6
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %48

36:                                               ; preds = %31
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call i64 @strlen(ptr noundef %37) #7
  %39 = icmp ne i64 %38, 0
  br i1 %39, label %40, label %48

40:                                               ; preds = %36
  %41 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %42 = call ptr @strcat(ptr noundef %41, ptr noundef @.str.257) #6
  %43 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = call ptr @strcat(ptr noundef %43, ptr noundef %44) #6
  %46 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %47 = call ptr @strcat(ptr noundef %46, ptr noundef @.str.15) #6
  br label %48

48:                                               ; preds = %40, %36, %31
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %63

51:                                               ; preds = %48
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call i64 @strlen(ptr noundef %52) #7
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %63

55:                                               ; preds = %51
  %56 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %57 = call ptr @strcat(ptr noundef %56, ptr noundef @.str.258) #6
  %58 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = call ptr @strcat(ptr noundef %58, ptr noundef %59) #6
  %61 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %62 = call ptr @strcat(ptr noundef %61, ptr noundef @.str.15) #6
  br label %63

63:                                               ; preds = %55, %51, %48
  %64 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %65 = call ptr @strcat(ptr noundef %64, ptr noundef @.str.35) #6
  %66 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %67 = call ptr @strcat(ptr noundef %66, ptr noundef @.str.37) #6
  %68 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %69 = call ptr @strcat(ptr noundef %68, ptr noundef @.str.39) #6
  %70 = call noundef i32 @_ZL12osx9orBetterv()
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %75, label %72

72:                                               ; preds = %63
  %73 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %74 = call ptr @strcat(ptr noundef %73, ptr noundef @.str.40) #6
  br label %75

75:                                               ; preds = %72, %63
  br label %554

76:                                               ; preds = %2
  %77 = call noundef i32 @_ZL14kdialogPresentv()
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %141

79:                                               ; preds = %76
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %88

82:                                               ; preds = %79
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = call i32 @strcmp(ptr noundef %83, ptr noundef @.str.10) #7
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %88, label %86

86:                                               ; preds = %82
  %87 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.41) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

88:                                               ; preds = %82, %79
  %89 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %90 = call ptr @strcpy(ptr noundef %89, ptr noundef @.str.41) #6
  %91 = call noundef i32 @_ZL14kdialogPresentv()
  %92 = icmp eq i32 %91, 2
  br i1 %92, label %93, label %96

93:                                               ; preds = %88
  %94 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %95 = call ptr @strcat(ptr noundef %94, ptr noundef @.str.42) #6
  br label %96

96:                                               ; preds = %93, %88
  %97 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %98 = call ptr @strcat(ptr noundef %97, ptr noundef @.str.314) #6
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %122

101:                                              ; preds = %96
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = call i64 @strlen(ptr noundef %102) #7
  %104 = icmp ne i64 %103, 0
  br i1 %104, label %105, label %122

105:                                              ; preds = %101
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 0
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = icmp ne i32 %109, 47
  br i1 %110, label %111, label %114

111:                                              ; preds = %105
  %112 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %113 = call ptr @strcat(ptr noundef %112, ptr noundef @.str.261) #6
  br label %114

114:                                              ; preds = %111, %105
  %115 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %116 = call ptr @strcat(ptr noundef %115, ptr noundef @.str.47) #6
  %117 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = call ptr @strcat(ptr noundef %117, ptr noundef %118) #6
  %120 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %121 = call ptr @strcat(ptr noundef %120, ptr noundef @.str.47) #6
  br label %125

122:                                              ; preds = %101, %96
  %123 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %124 = call ptr @strcat(ptr noundef %123, ptr noundef @.str.261) #6
  br label %125

125:                                              ; preds = %122, %114
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %140

128:                                              ; preds = %125
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = call i64 @strlen(ptr noundef %129) #7
  %131 = icmp ne i64 %130, 0
  br i1 %131, label %132, label %140

132:                                              ; preds = %128
  %133 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %134 = call ptr @strcat(ptr noundef %133, ptr noundef @.str.49) #6
  %135 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = call ptr @strcat(ptr noundef %135, ptr noundef %136) #6
  %138 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %139 = call ptr @strcat(ptr noundef %138, ptr noundef @.str.47) #6
  br label %140

140:                                              ; preds = %132, %128, %125
  br label %553

141:                                              ; preds = %76
  %142 = call noundef i32 @_ZL13zenityPresentv()
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %153, label %144

144:                                              ; preds = %141
  %145 = call noundef i32 @_ZL17matedialogPresentv()
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %153, label %147

147:                                              ; preds = %144
  %148 = call noundef i32 @_ZL20shellementaryPresentv()
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %153, label %150

150:                                              ; preds = %147
  %151 = call noundef i32 @_ZL12qarmaPresentv()
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %266

153:                                              ; preds = %150, %147, %144, %141
  %154 = call noundef i32 @_ZL13zenityPresentv()
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %177

156:                                              ; preds = %153
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %165

159:                                              ; preds = %156
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = call i32 @strcmp(ptr noundef %160, ptr noundef @.str.10) #7
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %165, label %163

163:                                              ; preds = %159
  %164 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.52) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

165:                                              ; preds = %159, %156
  %166 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %167 = call ptr @strcpy(ptr noundef %166, ptr noundef @.str.52) #6
  %168 = call noundef i32 @_ZL14zenity3Presentv()
  %169 = icmp sge i32 %168, 4
  br i1 %169, label %170, label %176

170:                                              ; preds = %165
  %171 = call ptr @getenv(ptr noundef @.str.54) #6
  %172 = icmp ne ptr %171, null
  br i1 %172, label %176, label %173

173:                                              ; preds = %170
  %174 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %175 = call ptr @strcat(ptr noundef %174, ptr noundef @.str.55) #6
  br label %176

176:                                              ; preds = %173, %170, %165
  br label %227

177:                                              ; preds = %153
  %178 = call noundef i32 @_ZL17matedialogPresentv()
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %192

180:                                              ; preds = %177
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = icmp ne ptr %181, null
  br i1 %182, label %183, label %189

183:                                              ; preds = %180
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = call i32 @strcmp(ptr noundef %184, ptr noundef @.str.10) #7
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %189, label %187

187:                                              ; preds = %183
  %188 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.56) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

189:                                              ; preds = %183, %180
  %190 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %191 = call ptr @strcpy(ptr noundef %190, ptr noundef @.str.56) #6
  br label %226

192:                                              ; preds = %177
  %193 = call noundef i32 @_ZL20shellementaryPresentv()
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %207

195:                                              ; preds = %192
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = icmp ne ptr %196, null
  br i1 %197, label %198, label %204

198:                                              ; preds = %195
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = call i32 @strcmp(ptr noundef %199, ptr noundef @.str.10) #7
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %204, label %202

202:                                              ; preds = %198
  %203 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.58) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

204:                                              ; preds = %198, %195
  %205 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %206 = call ptr @strcpy(ptr noundef %205, ptr noundef @.str.58) #6
  br label %225

207:                                              ; preds = %192
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = icmp ne ptr %208, null
  br i1 %209, label %210, label %216

210:                                              ; preds = %207
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = call i32 @strcmp(ptr noundef %211, ptr noundef @.str.10) #7
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %216, label %214

214:                                              ; preds = %210
  %215 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.60) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

216:                                              ; preds = %210, %207
  %217 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %218 = call ptr @strcpy(ptr noundef %217, ptr noundef @.str.60) #6
  %219 = call ptr @getenv(ptr noundef @.str.54) #6
  %220 = icmp ne ptr %219, null
  br i1 %220, label %224, label %221

221:                                              ; preds = %216
  %222 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %223 = call ptr @strcat(ptr noundef %222, ptr noundef @.str.42) #6
  br label %224

224:                                              ; preds = %221, %216
  br label %225

225:                                              ; preds = %224, %204
  br label %226

226:                                              ; preds = %225, %189
  br label %227

227:                                              ; preds = %226, %176
  %228 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %229 = call ptr @strcat(ptr noundef %228, ptr noundef @.str.315) #6
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = icmp ne ptr %230, null
  br i1 %231, label %232, label %244

232:                                              ; preds = %227
  %233 = load ptr, ptr %4, align 8, !tbaa !5
  %234 = call i64 @strlen(ptr noundef %233) #7
  %235 = icmp ne i64 %234, 0
  br i1 %235, label %236, label %244

236:                                              ; preds = %232
  %237 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %238 = call ptr @strcat(ptr noundef %237, ptr noundef @.str.66) #6
  %239 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %240 = load ptr, ptr %4, align 8, !tbaa !5
  %241 = call ptr @strcat(ptr noundef %239, ptr noundef %240) #6
  %242 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %243 = call ptr @strcat(ptr noundef %242, ptr noundef @.str.47) #6
  br label %244

244:                                              ; preds = %236, %232, %227
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = icmp ne ptr %245, null
  br i1 %246, label %247, label %259

247:                                              ; preds = %244
  %248 = load ptr, ptr %5, align 8, !tbaa !5
  %249 = call i64 @strlen(ptr noundef %248) #7
  %250 = icmp ne i64 %249, 0
  br i1 %250, label %251, label %259

251:                                              ; preds = %247
  %252 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %253 = call ptr @strcat(ptr noundef %252, ptr noundef @.str.263) #6
  %254 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = call ptr @strcat(ptr noundef %254, ptr noundef %255) #6
  %257 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %258 = call ptr @strcat(ptr noundef %257, ptr noundef @.str.47) #6
  br label %259

259:                                              ; preds = %251, %247, %244
  %260 = load i32, ptr @tinyfd_silent, align 4, !tbaa !9
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %262, label %265

262:                                              ; preds = %259
  %263 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %264 = call ptr @strcat(ptr noundef %263, ptr noundef @.str.70) #6
  br label %265

265:                                              ; preds = %262, %259
  br label %552

266:                                              ; preds = %150
  %267 = call noundef i32 @_ZL14xdialogPresentv()
  %268 = icmp ne i32 %267, 0
  br i1 %268, label %335, label %269

269:                                              ; preds = %266
  %270 = call noundef i32 @_ZL15tkinter2Presentv()
  %271 = icmp ne i32 %270, 0
  br i1 %271, label %272, label %335

272:                                              ; preds = %269
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = icmp ne ptr %273, null
  br i1 %274, label %275, label %281

275:                                              ; preds = %272
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = call i32 @strcmp(ptr noundef %276, ptr noundef @.str.10) #7
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %281, label %279

279:                                              ; preds = %275
  %280 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.73) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

281:                                              ; preds = %275, %272
  %282 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %283 = call ptr @strcpy(ptr noundef %282, ptr noundef @_ZL12gPython2Name) #6
  %284 = call noundef i32 @_ZL17isTerminalRunningv()
  %285 = icmp ne i32 %284, 0
  br i1 %285, label %292, label %286

286:                                              ; preds = %281
  %287 = call noundef i32 @_ZL8isDarwinv()
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %292

289:                                              ; preds = %286
  %290 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %291 = call ptr @strcat(ptr noundef %290, ptr noundef @.str.74) #6
  br label %292

292:                                              ; preds = %289, %286, %281
  %293 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %294 = call ptr @strcat(ptr noundef %293, ptr noundef @.str.266) #6
  %295 = call noundef i32 @_ZL8isDarwinv()
  %296 = icmp ne i32 %295, 0
  br i1 %296, label %297, label %300

297:                                              ; preds = %292
  %298 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %299 = call ptr @strcat(ptr noundef %298, ptr noundef @.str.76) #6
  br label %300

300:                                              ; preds = %297, %292
  %301 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %302 = call ptr @strcat(ptr noundef %301, ptr noundef @.str.316) #6
  %303 = load ptr, ptr %4, align 8, !tbaa !5
  %304 = icmp ne ptr %303, null
  br i1 %304, label %305, label %317

305:                                              ; preds = %300
  %306 = load ptr, ptr %4, align 8, !tbaa !5
  %307 = call i64 @strlen(ptr noundef %306) #7
  %308 = icmp ne i64 %307, 0
  br i1 %308, label %309, label %317

309:                                              ; preds = %305
  %310 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %311 = call ptr @strcat(ptr noundef %310, ptr noundef @.str.88) #6
  %312 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %313 = load ptr, ptr %4, align 8, !tbaa !5
  %314 = call ptr @strcat(ptr noundef %312, ptr noundef %313) #6
  %315 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %316 = call ptr @strcat(ptr noundef %315, ptr noundef @.str.87) #6
  br label %317

317:                                              ; preds = %309, %305, %300
  %318 = load ptr, ptr %5, align 8, !tbaa !5
  %319 = icmp ne ptr %318, null
  br i1 %319, label %320, label %332

320:                                              ; preds = %317
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = call i64 @strlen(ptr noundef %321) #7
  %323 = icmp ne i64 %322, 0
  br i1 %323, label %324, label %332

324:                                              ; preds = %320
  %325 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %326 = call ptr @strcat(ptr noundef %325, ptr noundef @.str.268) #6
  %327 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %328 = load ptr, ptr %5, align 8, !tbaa !5
  %329 = call ptr @strcat(ptr noundef %327, ptr noundef %328) #6
  %330 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %331 = call ptr @strcat(ptr noundef %330, ptr noundef @.str.92) #6
  br label %332

332:                                              ; preds = %324, %320, %317
  %333 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %334 = call ptr @strcat(ptr noundef %333, ptr noundef @.str.275) #6
  br label %551

335:                                              ; preds = %269, %266
  %336 = call noundef i32 @_ZL14xdialogPresentv()
  %337 = icmp ne i32 %336, 0
  br i1 %337, label %389, label %338

338:                                              ; preds = %335
  %339 = call noundef i32 @_ZL15tkinter3Presentv()
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %389

341:                                              ; preds = %338
  %342 = load ptr, ptr %4, align 8, !tbaa !5
  %343 = icmp ne ptr %342, null
  br i1 %343, label %344, label %350

344:                                              ; preds = %341
  %345 = load ptr, ptr %4, align 8, !tbaa !5
  %346 = call i32 @strcmp(ptr noundef %345, ptr noundef @.str.10) #7
  %347 = icmp ne i32 %346, 0
  br i1 %347, label %350, label %348

348:                                              ; preds = %344
  %349 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.95) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

350:                                              ; preds = %344, %341
  %351 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %352 = call ptr @strcpy(ptr noundef %351, ptr noundef @_ZL12gPython3Name) #6
  %353 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %354 = call ptr @strcat(ptr noundef %353, ptr noundef @.str.276) #6
  %355 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %356 = call ptr @strcat(ptr noundef %355, ptr noundef @.str.317) #6
  %357 = load ptr, ptr %4, align 8, !tbaa !5
  %358 = icmp ne ptr %357, null
  br i1 %358, label %359, label %371

359:                                              ; preds = %350
  %360 = load ptr, ptr %4, align 8, !tbaa !5
  %361 = call i64 @strlen(ptr noundef %360) #7
  %362 = icmp ne i64 %361, 0
  br i1 %362, label %363, label %371

363:                                              ; preds = %359
  %364 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %365 = call ptr @strcat(ptr noundef %364, ptr noundef @.str.88) #6
  %366 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %367 = load ptr, ptr %4, align 8, !tbaa !5
  %368 = call ptr @strcat(ptr noundef %366, ptr noundef %367) #6
  %369 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %370 = call ptr @strcat(ptr noundef %369, ptr noundef @.str.87) #6
  br label %371

371:                                              ; preds = %363, %359, %350
  %372 = load ptr, ptr %5, align 8, !tbaa !5
  %373 = icmp ne ptr %372, null
  br i1 %373, label %374, label %386

374:                                              ; preds = %371
  %375 = load ptr, ptr %5, align 8, !tbaa !5
  %376 = call i64 @strlen(ptr noundef %375) #7
  %377 = icmp ne i64 %376, 0
  br i1 %377, label %378, label %386

378:                                              ; preds = %374
  %379 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %380 = call ptr @strcat(ptr noundef %379, ptr noundef @.str.268) #6
  %381 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %382 = load ptr, ptr %5, align 8, !tbaa !5
  %383 = call ptr @strcat(ptr noundef %381, ptr noundef %382) #6
  %384 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %385 = call ptr @strcat(ptr noundef %384, ptr noundef @.str.92) #6
  br label %386

386:                                              ; preds = %378, %374, %371
  %387 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %388 = call ptr @strcat(ptr noundef %387, ptr noundef @.str.318) #6
  br label %550

389:                                              ; preds = %338, %335
  %390 = call noundef i32 @_ZL14xdialogPresentv()
  %391 = icmp ne i32 %390, 0
  br i1 %391, label %395, label %392

392:                                              ; preds = %389
  %393 = call noundef ptr @_ZL10dialogNamev()
  %394 = icmp ne ptr %393, null
  br i1 %394, label %395, label %523

395:                                              ; preds = %392, %389
  %396 = call noundef i32 @_ZL14xdialogPresentv()
  %397 = icmp ne i32 %396, 0
  br i1 %397, label %398, label %410

398:                                              ; preds = %395
  %399 = load ptr, ptr %4, align 8, !tbaa !5
  %400 = icmp ne ptr %399, null
  br i1 %400, label %401, label %407

401:                                              ; preds = %398
  %402 = load ptr, ptr %4, align 8, !tbaa !5
  %403 = call i32 @strcmp(ptr noundef %402, ptr noundef @.str.10) #7
  %404 = icmp ne i32 %403, 0
  br i1 %404, label %407, label %405

405:                                              ; preds = %401
  %406 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.120) #6
  store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

407:                                              ; preds = %401, %398
  store i32 1, ptr %9, align 4, !tbaa !9
  %408 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %409 = call ptr @strcpy(ptr noundef %408, ptr noundef @.str.121) #6
  br label %446

410:                                              ; preds = %395
  %411 = call noundef i32 @_ZL17isTerminalRunningv()
  %412 = icmp ne i32 %411, 0
  br i1 %412, label %413, label %425

413:                                              ; preds = %410
  %414 = load ptr, ptr %4, align 8, !tbaa !5
  %415 = icmp ne ptr %414, null
  br i1 %415, label %416, label %422

416:                                              ; preds = %413
  %417 = load ptr, ptr %4, align 8, !tbaa !5
  %418 = call i32 @strcmp(ptr noundef %417, ptr noundef @.str.10) #7
  %419 = icmp ne i32 %418, 0
  br i1 %419, label %422, label %420

420:                                              ; preds = %416
  %421 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.122) #6
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

422:                                              ; preds = %416, %413
  %423 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %424 = call ptr @strcpy(ptr noundef %423, ptr noundef @.str.123) #6
  br label %445

425:                                              ; preds = %410
  %426 = load ptr, ptr %4, align 8, !tbaa !5
  %427 = icmp ne ptr %426, null
  br i1 %427, label %428, label %434

428:                                              ; preds = %425
  %429 = load ptr, ptr %4, align 8, !tbaa !5
  %430 = call i32 @strcmp(ptr noundef %429, ptr noundef @.str.10) #7
  %431 = icmp ne i32 %430, 0
  br i1 %431, label %434, label %432

432:                                              ; preds = %428
  %433 = call ptr @strcpy(ptr noundef @tinyfd_response, ptr noundef @.str.122) #6
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

434:                                              ; preds = %428, %425
  store i32 1, ptr %10, align 4, !tbaa !9
  %435 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %436 = call noundef ptr @_ZL12terminalNamev()
  %437 = call ptr @strcpy(ptr noundef %435, ptr noundef %436) #6
  %438 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %439 = call ptr @strcat(ptr noundef %438, ptr noundef @.str.124) #6
  %440 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %441 = call noundef ptr @_ZL10dialogNamev()
  %442 = call ptr @strcat(ptr noundef %440, ptr noundef %441) #6
  %443 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %444 = call ptr @strcat(ptr noundef %443, ptr noundef @.str.125) #6
  br label %445

445:                                              ; preds = %434, %422
  br label %446

446:                                              ; preds = %445, %407
  %447 = load ptr, ptr %4, align 8, !tbaa !5
  %448 = icmp ne ptr %447, null
  br i1 %448, label %449, label %461

449:                                              ; preds = %446
  %450 = load ptr, ptr %4, align 8, !tbaa !5
  %451 = call i64 @strlen(ptr noundef %450) #7
  %452 = icmp ne i64 %451, 0
  br i1 %452, label %453, label %461

453:                                              ; preds = %449
  %454 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %455 = call ptr @strcat(ptr noundef %454, ptr noundef @.str.129) #6
  %456 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %457 = load ptr, ptr %4, align 8, !tbaa !5
  %458 = call ptr @strcat(ptr noundef %456, ptr noundef %457) #6
  %459 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %460 = call ptr @strcat(ptr noundef %459, ptr noundef @.str.15) #6
  br label %461

461:                                              ; preds = %453, %449, %446
  %462 = call noundef i32 @_ZL14xdialogPresentv()
  %463 = icmp ne i32 %462, 0
  br i1 %463, label %474, label %464

464:                                              ; preds = %461
  %465 = call noundef i32 @_ZL14gdialogPresentv()
  %466 = icmp ne i32 %465, 0
  br i1 %466, label %474, label %467

467:                                              ; preds = %464
  %468 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %469 = call ptr @strcat(ptr noundef %468, ptr noundef @.str.130) #6
  %470 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %471 = call ptr @strcat(ptr noundef %470, ptr noundef @.str.279) #6
  %472 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %473 = call ptr @strcat(ptr noundef %472, ptr noundef @.str.15) #6
  br label %474

474:                                              ; preds = %467, %464, %461
  %475 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %476 = call ptr @strcat(ptr noundef %475, ptr noundef @.str.319) #6
  %477 = load ptr, ptr %5, align 8, !tbaa !5
  %478 = icmp ne ptr %477, null
  br i1 %478, label %479, label %488

479:                                              ; preds = %474
  %480 = load ptr, ptr %5, align 8, !tbaa !5
  %481 = call i64 @strlen(ptr noundef %480) #7
  %482 = icmp ne i64 %481, 0
  br i1 %482, label %483, label %488

483:                                              ; preds = %479
  %484 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %485 = load ptr, ptr %5, align 8, !tbaa !5
  %486 = call ptr @strcat(ptr noundef %484, ptr noundef %485) #6
  %487 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  call void @_ZL16ensureFinalSlashPc(ptr noundef %487)
  br label %504

488:                                              ; preds = %479, %474
  %489 = call noundef i32 @_ZL17isTerminalRunningv()
  %490 = icmp ne i32 %489, 0
  br i1 %490, label %500, label %491

491:                                              ; preds = %488
  %492 = load i32, ptr %9, align 4, !tbaa !9
  %493 = icmp ne i32 %492, 0
  br i1 %493, label %500, label %494

494:                                              ; preds = %491
  %495 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %496 = call ptr @getenv(ptr noundef @.str.282) #6
  %497 = call ptr @strcat(ptr noundef %495, ptr noundef %496) #6
  %498 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %499 = call ptr @strcat(ptr noundef %498, ptr noundef @.str.283) #6
  br label %503

500:                                              ; preds = %491, %488
  %501 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %502 = call ptr @strcat(ptr noundef %501, ptr noundef @.str.281) #6
  br label %503

503:                                              ; preds = %500, %494
  br label %504

504:                                              ; preds = %503, %483
  %505 = load i32, ptr %9, align 4, !tbaa !9
  %506 = icmp ne i32 %505, 0
  br i1 %506, label %507, label %510

507:                                              ; preds = %504
  %508 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %509 = call ptr @strcat(ptr noundef %508, ptr noundef @.str.284) #6
  br label %522

510:                                              ; preds = %504
  %511 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %512 = call ptr @strcat(ptr noundef %511, ptr noundef @.str.285) #6
  %513 = load i32, ptr %10, align 4, !tbaa !9
  %514 = icmp ne i32 %513, 0
  br i1 %514, label %515, label %518

515:                                              ; preds = %510
  %516 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %517 = call ptr @strcat(ptr noundef %516, ptr noundef @.str.286) #6
  br label %521

518:                                              ; preds = %510
  %519 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %520 = call ptr @strcat(ptr noundef %519, ptr noundef @.str.287) #6
  br label %521

521:                                              ; preds = %518, %515
  br label %522

522:                                              ; preds = %521, %507
  br label %549

523:                                              ; preds = %392
  %524 = load ptr, ptr %4, align 8, !tbaa !5
  %525 = icmp ne ptr %524, null
  br i1 %525, label %526, label %533

526:                                              ; preds = %523
  %527 = load ptr, ptr %4, align 8, !tbaa !5
  %528 = call i32 @strcmp(ptr noundef %527, ptr noundef @.str.10) #7
  %529 = icmp ne i32 %528, 0
  br i1 %529, label %533, label %530

530:                                              ; preds = %526
  %531 = load ptr, ptr %4, align 8, !tbaa !5
  %532 = call ptr @tinyfd_inputBox(ptr noundef %531, ptr noundef null, ptr noundef null)
  store ptr %532, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

533:                                              ; preds = %526, %523
  %534 = load ptr, ptr %4, align 8, !tbaa !5
  %535 = call ptr @tinyfd_inputBox(ptr noundef %534, ptr noundef @.str.320, ptr noundef @.str.177)
  store ptr %535, ptr %8, align 8, !tbaa !5
  %536 = load ptr, ptr %8, align 8, !tbaa !5
  %537 = icmp ne ptr %536, null
  br i1 %537, label %538, label %546

538:                                              ; preds = %533
  %539 = load ptr, ptr %8, align 8, !tbaa !5
  %540 = call i64 @strlen(ptr noundef %539) #7
  %541 = icmp ne i64 %540, 0
  br i1 %541, label %542, label %546

542:                                              ; preds = %538
  %543 = load ptr, ptr %8, align 8, !tbaa !5
  %544 = call noundef i32 @_ZL9dirExistsPKc(ptr noundef %543)
  %545 = icmp ne i32 %544, 0
  br i1 %545, label %547, label %546

546:                                              ; preds = %542, %538, %533
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

547:                                              ; preds = %542
  %548 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %548, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

549:                                              ; preds = %522
  br label %550

550:                                              ; preds = %549, %386
  br label %551

551:                                              ; preds = %550, %332
  br label %552

552:                                              ; preds = %551, %265
  br label %553

553:                                              ; preds = %552, %140
  br label %554

554:                                              ; preds = %553, %75
  %555 = load i32, ptr @tinyfd_verbose, align 4, !tbaa !9
  %556 = icmp ne i32 %555, 0
  br i1 %556, label %557, label %560

557:                                              ; preds = %554
  %558 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %559 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %558)
  br label %560

560:                                              ; preds = %557, %554
  %561 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %562 = call noalias ptr @popen(ptr noundef %561, ptr noundef @.str.9)
  store ptr %562, ptr %7, align 8, !tbaa !5
  %563 = icmp ne ptr %562, null
  br i1 %563, label %565, label %564

564:                                              ; preds = %560
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

565:                                              ; preds = %560
  br label %566

566:                                              ; preds = %570, %565
  %567 = load ptr, ptr %7, align 8, !tbaa !5
  %568 = call ptr @fgets(ptr noundef @_ZZ25tinyfd_selectFolderDialogE5lBuff, i32 noundef 1024, ptr noundef %567)
  %569 = icmp ne ptr %568, null
  br i1 %569, label %570, label %571

570:                                              ; preds = %566
  br label %566, !llvm.loop !12

571:                                              ; preds = %566
  %572 = load ptr, ptr %7, align 8, !tbaa !5
  %573 = call i32 @pclose(ptr noundef %572)
  %574 = call i64 @strlen(ptr noundef @_ZZ25tinyfd_selectFolderDialogE5lBuff) #7
  %575 = sub i64 %574, 1
  %576 = getelementptr inbounds [1024 x i8], ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, i64 0, i64 %575
  %577 = load i8, ptr %576, align 1, !tbaa !11
  %578 = sext i8 %577 to i32
  %579 = icmp eq i32 %578, 10
  br i1 %579, label %580, label %584

580:                                              ; preds = %571
  %581 = call i64 @strlen(ptr noundef @_ZZ25tinyfd_selectFolderDialogE5lBuff) #7
  %582 = sub i64 %581, 1
  %583 = getelementptr inbounds [1024 x i8], ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, i64 0, i64 %582
  store i8 0, ptr %583, align 1, !tbaa !11
  br label %584

584:                                              ; preds = %580, %571
  %585 = call i64 @strlen(ptr noundef @_ZZ25tinyfd_selectFolderDialogE5lBuff) #7
  %586 = icmp ne i64 %585, 0
  br i1 %586, label %587, label %590

587:                                              ; preds = %584
  %588 = call noundef i32 @_ZL9dirExistsPKc(ptr noundef @_ZZ25tinyfd_selectFolderDialogE5lBuff)
  %589 = icmp ne i32 %588, 0
  br i1 %589, label %591, label %590

590:                                              ; preds = %587, %584
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

591:                                              ; preds = %587
  store ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %592

592:                                              ; preds = %591, %590, %564, %547, %546, %530, %432, %420, %405, %348, %279, %214, %202, %187, %163, %86, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #6
  %593 = load ptr, ptr %3, align 8
  ret ptr %593
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL16ensureFinalSlashPc(ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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"

@tinyfd_verbose = external dso_local local_unnamed_addr global i32, align 4
@tinyfd_silent = external dso_local local_unnamed_addr global i32, align 4
@tinyfd_response = external dso_local global [1024 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL12gPython2Name = external hidden global [16 x i8], align 16
@.str.74 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [120 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL12gPython3Name = external hidden global [16 x i8], align 16
@.str.120 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.257 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.258 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.261 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.263 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.266 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.268 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.285 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.286 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZZ25tinyfd_selectFolderDialogE5lBuff = external hidden global [1024 x i8], align 16
@.str.313 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.317 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.318 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.319 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.320 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL16osascriptPresentv() local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12osx9orBetterv() local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14kdialogPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13zenityPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17matedialogPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL20shellementaryPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12qarmaPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14zenity3Presentv() local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14gdialogPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14xdialogPresentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15tkinter2Presentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17isTerminalRunningv() local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL8isDarwinv() local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15tkinter3Presentv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10dialogNamev() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL12terminalNamev() local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @tinyfd_inputBox(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL9dirExistsPKc(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local ptr @tinyfd_selectFolderDialog(ptr noundef %0, ptr noundef readonly %1) local_unnamed_addr #3 {
  %3 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #7
  store i8 0, ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, align 16, !tbaa !5
  %4 = tail call noundef i32 @_ZL16osascriptPresentv()
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %33, label %5

5:                                                ; preds = %2
  %.not162 = icmp eq ptr %0, null
  br i1 %.not162, label %10, label %6

6:                                                ; preds = %5
  %7 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not163 = icmp eq i32 %7, 0
  br i1 %.not163, label %8, label %10

8:                                                ; preds = %6
  %9 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.11) #7
  br label %268

10:                                               ; preds = %6, %5
  %11 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.12) #7
  %12 = call noundef i32 @_ZL12osx9orBetterv()
  %.not164 = icmp eq i32 %12, 0
  br i1 %.not164, label %13, label %15

13:                                               ; preds = %10
  %14 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.13) #7
  br label %15

15:                                               ; preds = %13, %10
  %16 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.313) #7
  br i1 %.not162, label %22, label %17

17:                                               ; preds = %15
  %char0165 = load i8, ptr %0, align 1
  %.not166 = icmp eq i8 %char0165, 0
  br i1 %.not166, label %22, label %18

18:                                               ; preds = %17
  %19 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.257) #7
  %20 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %0) #7
  %21 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.15) #7
  br label %22

22:                                               ; preds = %18, %17, %15
  %.not167 = icmp eq ptr %1, null
  br i1 %.not167, label %28, label %23

23:                                               ; preds = %22
  %char0168 = load i8, ptr %1, align 1
  %.not169 = icmp eq i8 %char0168, 0
  br i1 %.not169, label %28, label %24

24:                                               ; preds = %23
  %25 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.258) #7
  %26 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %1) #7
  %27 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.15) #7
  br label %28

28:                                               ; preds = %24, %23, %22
  %29 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.35) #7
  %30 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.37) #7
  %31 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.39) #7
  %32 = call noundef i32 @_ZL12osx9orBetterv()
  %.not170 = icmp eq i32 %32, 0
  br i1 %.not170, label %.sink.split178, label %250

33:                                               ; preds = %2
  %34 = tail call noundef i32 @_ZL14kdialogPresentv()
  %.not83 = icmp eq i32 %34, 0
  br i1 %.not83, label %57, label %35

35:                                               ; preds = %33
  %.not154 = icmp eq ptr %0, null
  br i1 %.not154, label %40, label %36

36:                                               ; preds = %35
  %37 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not155 = icmp eq i32 %37, 0
  br i1 %.not155, label %38, label %40

38:                                               ; preds = %36
  %39 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.41) #7
  br label %268

40:                                               ; preds = %36, %35
  %41 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.41) #7
  %42 = call noundef i32 @_ZL14kdialogPresentv()
  %43 = icmp eq i32 %42, 2
  br i1 %43, label %44, label %46

44:                                               ; preds = %40
  %45 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.42) #7
  br label %46

46:                                               ; preds = %44, %40
  %47 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.314) #7
  %.not156 = icmp eq ptr %1, null
  br i1 %.not156, label %54, label %48

48:                                               ; preds = %46
  %char0157 = load i8, ptr %1, align 1
  switch i8 %char0157, label %49 [
    i8 0, label %54
    i8 47, label %51
  ]

49:                                               ; preds = %48
  %50 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.261) #7
  br label %51

51:                                               ; preds = %48, %49
  %52 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.47) #7
  %53 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %1) #7
  br label %54

54:                                               ; preds = %46, %48, %51
  %.str.261.sink = phi ptr [ @.str.47, %51 ], [ @.str.261, %48 ], [ @.str.261, %46 ]
  %55 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.261.sink) #7
  br i1 %.not154, label %250, label %56

56:                                               ; preds = %54
  %char0160 = load i8, ptr %0, align 1
  %.not161 = icmp eq i8 %char0160, 0
  br i1 %.not161, label %250, label %.sink.split178.sink.split.sink.split

57:                                               ; preds = %33
  %58 = tail call noundef i32 @_ZL13zenityPresentv()
  %.not84 = icmp eq i32 %58, 0
  br i1 %.not84, label %59, label %65

59:                                               ; preds = %57
  %60 = tail call noundef i32 @_ZL17matedialogPresentv()
  %.not85 = icmp eq i32 %60, 0
  br i1 %.not85, label %61, label %65

61:                                               ; preds = %59
  %62 = tail call noundef i32 @_ZL20shellementaryPresentv()
  %.not86 = icmp eq i32 %62, 0
  br i1 %.not86, label %63, label %65

63:                                               ; preds = %61
  %64 = tail call noundef i32 @_ZL12qarmaPresentv()
  %.not87 = icmp eq i32 %64, 0
  br i1 %.not87, label %123, label %65

65:                                               ; preds = %63, %61, %59, %57
  %66 = tail call noundef i32 @_ZL13zenityPresentv()
  %.not134 = icmp eq i32 %66, 0
  br i1 %.not134, label %80, label %67

67:                                               ; preds = %65
  %.not144 = icmp eq ptr %0, null
  br i1 %.not144, label %72, label %68

68:                                               ; preds = %67
  %69 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not145 = icmp eq i32 %69, 0
  br i1 %.not145, label %70, label %72

70:                                               ; preds = %68
  %71 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.52) #7
  br label %268

72:                                               ; preds = %68, %67
  %73 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.52) #7
  %74 = call noundef i32 @_ZL14zenity3Presentv()
  %75 = icmp sgt i32 %74, 3
  br i1 %75, label %76, label %108

76:                                               ; preds = %72
  %77 = call ptr @getenv(ptr noundef nonnull @.str.54) #7
  %.not146 = icmp eq ptr %77, null
  br i1 %.not146, label %78, label %108

78:                                               ; preds = %76
  %79 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.55) #7
  br label %108

80:                                               ; preds = %65
  %81 = tail call noundef i32 @_ZL17matedialogPresentv()
  %.not135 = icmp eq i32 %81, 0
  br i1 %.not135, label %89, label %82

82:                                               ; preds = %80
  %.not142 = icmp eq ptr %0, null
  br i1 %.not142, label %87, label %83

83:                                               ; preds = %82
  %84 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not143 = icmp eq i32 %84, 0
  br i1 %.not143, label %85, label %87

85:                                               ; preds = %83
  %86 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.56) #7
  br label %268

87:                                               ; preds = %83, %82
  %88 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.56) #7
  br label %108

89:                                               ; preds = %80
  %90 = tail call noundef i32 @_ZL20shellementaryPresentv()
  %.not136 = icmp eq i32 %90, 0
  %.not137 = icmp eq ptr %0, null
  br i1 %.not136, label %98, label %91

91:                                               ; preds = %89
  br i1 %.not137, label %96, label %92

92:                                               ; preds = %91
  %93 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not141 = icmp eq i32 %93, 0
  br i1 %.not141, label %94, label %96

94:                                               ; preds = %92
  %95 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.58) #7
  br label %268

96:                                               ; preds = %92, %91
  %97 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.58) #7
  br label %108

98:                                               ; preds = %89
  br i1 %.not137, label %103, label %99

99:                                               ; preds = %98
  %100 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not138 = icmp eq i32 %100, 0
  br i1 %.not138, label %101, label %103

101:                                              ; preds = %99
  %102 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.60) #7
  br label %268

103:                                              ; preds = %99, %98
  %104 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.60) #7
  %105 = call ptr @getenv(ptr noundef nonnull @.str.54) #7
  %.not139 = icmp eq ptr %105, null
  br i1 %.not139, label %106, label %108

106:                                              ; preds = %103
  %107 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.42) #7
  br label %108

108:                                              ; preds = %87, %103, %106, %96, %72, %76, %78
  %109 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.315) #7
  %.not147 = icmp eq ptr %0, null
  br i1 %.not147, label %115, label %110

110:                                              ; preds = %108
  %char0148 = load i8, ptr %0, align 1
  %.not149 = icmp eq i8 %char0148, 0
  br i1 %.not149, label %115, label %111

111:                                              ; preds = %110
  %112 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.66) #7
  %113 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %0) #7
  %114 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.47) #7
  br label %115

115:                                              ; preds = %111, %110, %108
  %.not150 = icmp eq ptr %1, null
  br i1 %.not150, label %121, label %116

116:                                              ; preds = %115
  %char0151 = load i8, ptr %1, align 1
  %.not152 = icmp eq i8 %char0151, 0
  br i1 %.not152, label %121, label %117

117:                                              ; preds = %116
  %118 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.263) #7
  %119 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %1) #7
  %120 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.47) #7
  br label %121

121:                                              ; preds = %117, %116, %115
  %122 = load i32, ptr @tinyfd_silent, align 4, !tbaa !8
  %.not153 = icmp eq i32 %122, 0
  br i1 %.not153, label %250, label %.sink.split178

123:                                              ; preds = %63
  %124 = tail call noundef i32 @_ZL14xdialogPresentv()
  %.not88 = icmp eq i32 %124, 0
  br i1 %.not88, label %125, label %153

125:                                              ; preds = %123
  %126 = tail call noundef i32 @_ZL15tkinter2Presentv()
  %.not89 = icmp eq i32 %126, 0
  br i1 %.not89, label %153, label %127

127:                                              ; preds = %125
  %.not90 = icmp eq ptr %0, null
  br i1 %.not90, label %132, label %128

128:                                              ; preds = %127
  %129 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not91 = icmp eq i32 %129, 0
  br i1 %.not91, label %130, label %132

130:                                              ; preds = %128
  %131 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.73) #7
  br label %268

132:                                              ; preds = %128, %127
  %133 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @_ZL12gPython2Name) #7
  %134 = call noundef i32 @_ZL17isTerminalRunningv()
  %.not92 = icmp eq i32 %134, 0
  br i1 %.not92, label %135, label %139

135:                                              ; preds = %132
  %136 = call noundef i32 @_ZL8isDarwinv()
  %.not93 = icmp eq i32 %136, 0
  br i1 %.not93, label %139, label %137

137:                                              ; preds = %135
  %138 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.74) #7
  br label %139

139:                                              ; preds = %137, %135, %132
  %140 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.266) #7
  %141 = call noundef i32 @_ZL8isDarwinv()
  %.not94 = icmp eq i32 %141, 0
  br i1 %.not94, label %144, label %142

142:                                              ; preds = %139
  %143 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.76) #7
  br label %144

144:                                              ; preds = %142, %139
  %145 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.316) #7
  br i1 %.not90, label %151, label %146

146:                                              ; preds = %144
  %char0 = load i8, ptr %0, align 1
  %.not95 = icmp eq i8 %char0, 0
  br i1 %.not95, label %151, label %147

147:                                              ; preds = %146
  %148 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.88) #7
  %149 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %0) #7
  %150 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.87) #7
  br label %151

151:                                              ; preds = %147, %146, %144
  %.not96 = icmp eq ptr %1, null
  br i1 %.not96, label %.sink.split178, label %152

152:                                              ; preds = %151
  %char097 = load i8, ptr %1, align 1
  %.not98 = icmp eq i8 %char097, 0
  br i1 %.not98, label %.sink.split178, label %.sink.split178.sink.split.sink.split.sink.split

153:                                              ; preds = %125, %123
  %154 = tail call noundef i32 @_ZL14xdialogPresentv()
  %.not99 = icmp eq i32 %154, 0
  br i1 %.not99, label %155, label %173

155:                                              ; preds = %153
  %156 = tail call noundef i32 @_ZL15tkinter3Presentv()
  %.not100 = icmp eq i32 %156, 0
  br i1 %.not100, label %173, label %157

157:                                              ; preds = %155
  %.not101 = icmp eq ptr %0, null
  br i1 %.not101, label %.critedge, label %158

158:                                              ; preds = %157
  %159 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not102 = icmp eq i32 %159, 0
  br i1 %.not102, label %160, label %162

160:                                              ; preds = %158
  %161 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.95) #7
  br label %268

162:                                              ; preds = %158
  %163 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @_ZL12gPython3Name) #7
  %164 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.276) #7
  %165 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.317) #7
  %char0103 = load i8, ptr %0, align 1
  %.not104 = icmp eq i8 %char0103, 0
  br i1 %.not104, label %171, label %166

166:                                              ; preds = %162
  %167 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.88) #7
  br label %.sink.split

.critedge:                                        ; preds = %157
  %168 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @_ZL12gPython3Name) #7
  br label %.sink.split

.sink.split:                                      ; preds = %166, %.critedge
  %.str.276.sink = phi ptr [ @.str.276, %.critedge ], [ %0, %166 ]
  %.str.317.sink = phi ptr [ @.str.317, %.critedge ], [ @.str.87, %166 ]
  %169 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.276.sink) #7
  %170 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.317.sink) #7
  br label %171

171:                                              ; preds = %.sink.split, %162
  %.not105 = icmp eq ptr %1, null
  br i1 %.not105, label %.sink.split178, label %172

172:                                              ; preds = %171
  %char0106 = load i8, ptr %1, align 1
  %.not107 = icmp eq i8 %char0106, 0
  br i1 %.not107, label %.sink.split178, label %.sink.split178.sink.split.sink.split.sink.split

173:                                              ; preds = %155, %153
  %174 = tail call noundef i32 @_ZL14xdialogPresentv()
  %.not108 = icmp eq i32 %174, 0
  br i1 %.not108, label %175, label %177

175:                                              ; preds = %173
  %176 = tail call noundef ptr @_ZL10dialogNamev()
  %.not109 = icmp eq ptr %176, null
  br i1 %.not109, label %236, label %177

177:                                              ; preds = %175, %173
  %178 = tail call noundef i32 @_ZL14xdialogPresentv()
  %.not116.not = icmp eq i32 %178, 0
  br i1 %.not116.not, label %186, label %179

179:                                              ; preds = %177
  %.not122 = icmp eq ptr %0, null
  br i1 %.not122, label %184, label %180

180:                                              ; preds = %179
  %181 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not123 = icmp eq i32 %181, 0
  br i1 %.not123, label %182, label %184

182:                                              ; preds = %180
  %183 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.120) #7
  br label %268

184:                                              ; preds = %180, %179
  %185 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.121) #7
  br label %207

186:                                              ; preds = %177
  %187 = tail call noundef i32 @_ZL17isTerminalRunningv()
  %.not117 = icmp eq i32 %187, 0
  %.not118 = icmp eq ptr %0, null
  br i1 %.not117, label %195, label %188

188:                                              ; preds = %186
  br i1 %.not118, label %193, label %189

189:                                              ; preds = %188
  %190 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not121 = icmp eq i32 %190, 0
  br i1 %.not121, label %191, label %193

191:                                              ; preds = %189
  %192 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.122) #7
  br label %268

193:                                              ; preds = %189, %188
  %194 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.123) #7
  br label %207

195:                                              ; preds = %186
  br i1 %.not118, label %200, label %196

196:                                              ; preds = %195
  %197 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not119 = icmp eq i32 %197, 0
  br i1 %.not119, label %198, label %200

198:                                              ; preds = %196
  %199 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) @tinyfd_response, ptr noundef nonnull dereferenceable(1) @.str.122) #7
  br label %268

200:                                              ; preds = %196, %195
  %201 = tail call noundef ptr @_ZL12terminalNamev()
  %202 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %201) #7
  %203 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.124) #7
  %204 = call noundef ptr @_ZL10dialogNamev()
  %205 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %204) #7
  %206 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.125) #7
  br label %207

207:                                              ; preds = %193, %200, %184
  %.not133 = phi ptr [ @.str.287, %184 ], [ @.str.287, %193 ], [ @.str.286, %200 ]
  %.not124 = icmp eq ptr %0, null
  br i1 %.not124, label %213, label %208

208:                                              ; preds = %207
  %char0125 = load i8, ptr %0, align 1
  %.not126 = icmp eq i8 %char0125, 0
  br i1 %.not126, label %213, label %209

209:                                              ; preds = %208
  %210 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.129) #7
  %211 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %0) #7
  %212 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.15) #7
  br label %213

213:                                              ; preds = %209, %208, %207
  %214 = call noundef i32 @_ZL14xdialogPresentv()
  %.not127 = icmp eq i32 %214, 0
  br i1 %.not127, label %215, label %221

215:                                              ; preds = %213
  %216 = call noundef i32 @_ZL14gdialogPresentv()
  %.not128 = icmp eq i32 %216, 0
  br i1 %.not128, label %217, label %221

217:                                              ; preds = %215
  %218 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.130) #7
  %219 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.279) #7
  %220 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.15) #7
  br label %221

221:                                              ; preds = %217, %215, %213
  %222 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.319) #7
  %.not129 = icmp eq ptr %1, null
  br i1 %.not129, label %226, label %223

223:                                              ; preds = %221
  %char0130 = load i8, ptr %1, align 1
  %.not131 = icmp eq i8 %char0130, 0
  br i1 %.not131, label %226, label %224

224:                                              ; preds = %223
  %225 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %1) #7
  call void @_ZL16ensureFinalSlashPc(ptr noundef nonnull %3)
  br label %235

226:                                              ; preds = %223, %221
  %227 = call noundef i32 @_ZL17isTerminalRunningv()
  %228 = or i32 %227, %178
  %or.cond.not = icmp eq i32 %228, 0
  br i1 %or.cond.not, label %229, label %233

229:                                              ; preds = %226
  %230 = call ptr @getenv(ptr noundef nonnull @.str.282) #7
  %231 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %230) #7
  %232 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.283) #7
  br label %235

233:                                              ; preds = %226
  %234 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.281) #7
  br label %235

235:                                              ; preds = %229, %233, %224
  br i1 %.not116.not, label %.sink.split178.sink.split, label %.sink.split178

236:                                              ; preds = %175
  %.not110 = icmp eq ptr %0, null
  br i1 %.not110, label %241, label %237

237:                                              ; preds = %236
  %238 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %.not111 = icmp eq i32 %238, 0
  br i1 %.not111, label %239, label %241

239:                                              ; preds = %237
  %240 = tail call ptr @tinyfd_inputBox(ptr noundef nonnull %0, ptr noundef null, ptr noundef null)
  br label %268

241:                                              ; preds = %237, %236
  %242 = tail call ptr @tinyfd_inputBox(ptr noundef %0, ptr noundef nonnull @.str.320, ptr noundef nonnull @.str.177)
  %.not112 = icmp eq ptr %242, null
  br i1 %.not112, label %268, label %243

243:                                              ; preds = %241
  %char0113 = load i8, ptr %242, align 1
  %.not114 = icmp eq i8 %char0113, 0
  br i1 %.not114, label %268, label %244

244:                                              ; preds = %243
  %245 = tail call noundef i32 @_ZL9dirExistsPKc(ptr noundef nonnull %242)
  %.not115 = icmp eq i32 %245, 0
  %spec.select = select i1 %.not115, ptr null, ptr %242
  br label %268

.sink.split178.sink.split.sink.split.sink.split:  ; preds = %172, %152
  %.str.47.sink.ph.ph.ph = phi ptr [ @.str.275, %152 ], [ @.str.318, %172 ]
  %246 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.268) #7
  br label %.sink.split178.sink.split.sink.split

.sink.split178.sink.split.sink.split:             ; preds = %.sink.split178.sink.split.sink.split.sink.split, %56
  %.str.49.sink = phi ptr [ @.str.49, %56 ], [ %1, %.sink.split178.sink.split.sink.split.sink.split ]
  %.str.285.sink.ph = phi ptr [ %0, %56 ], [ @.str.92, %.sink.split178.sink.split.sink.split.sink.split ]
  %.str.47.sink.ph.ph = phi ptr [ @.str.47, %56 ], [ %.str.47.sink.ph.ph.ph, %.sink.split178.sink.split.sink.split.sink.split ]
  %247 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.49.sink) #7
  br label %.sink.split178.sink.split

.sink.split178.sink.split:                        ; preds = %.sink.split178.sink.split.sink.split, %235
  %.str.285.sink = phi ptr [ @.str.285, %235 ], [ %.str.285.sink.ph, %.sink.split178.sink.split.sink.split ]
  %.str.47.sink.ph = phi ptr [ %.not133, %235 ], [ %.str.47.sink.ph.ph, %.sink.split178.sink.split.sink.split ]
  %248 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.285.sink) #7
  br label %.sink.split178

.sink.split178:                                   ; preds = %.sink.split178.sink.split, %235, %171, %172, %151, %152, %121, %28
  %.str.47.sink = phi ptr [ @.str.40, %28 ], [ @.str.70, %121 ], [ @.str.275, %152 ], [ @.str.275, %151 ], [ @.str.318, %172 ], [ @.str.318, %171 ], [ @.str.284, %235 ], [ %.str.47.sink.ph, %.sink.split178.sink.split ]
  %249 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.47.sink) #7
  br label %250

250:                                              ; preds = %.sink.split178, %56, %54, %121, %28
  %251 = load i32, ptr @tinyfd_verbose, align 4, !tbaa !8
  %.not171 = icmp eq i32 %251, 0
  br i1 %.not171, label %254, label %252

252:                                              ; preds = %250
  %253 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %3)
  br label %254

254:                                              ; preds = %252, %250
  %255 = call noalias ptr @popen(ptr noundef nonnull %3, ptr noundef nonnull @.str.9)
  %.not172 = icmp eq ptr %255, null
  br i1 %.not172, label %268, label %.preheader

.preheader:                                       ; preds = %254, %.preheader
  %256 = call ptr @fgets(ptr noundef nonnull @_ZZ25tinyfd_selectFolderDialogE5lBuff, i32 noundef 1024, ptr noundef nonnull %255)
  %.not173 = icmp eq ptr %256, null
  br i1 %.not173, label %257, label %.preheader, !llvm.loop !10

257:                                              ; preds = %.preheader
  %258 = call i32 @pclose(ptr noundef nonnull %255)
  %259 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ25tinyfd_selectFolderDialogE5lBuff) #8
  %260 = add i64 %259, -1
  %261 = getelementptr inbounds [1024 x i8], ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, i64 0, i64 %260
  %262 = load i8, ptr %261, align 1, !tbaa !5
  %263 = icmp eq i8 %262, 10
  br i1 %263, label %264, label %265

264:                                              ; preds = %257
  store i8 0, ptr %261, align 1, !tbaa !5
  br label %265

265:                                              ; preds = %264, %257
  %char0174 = load i8, ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff, align 16
  %.not175 = icmp eq i8 %char0174, 0
  br i1 %.not175, label %268, label %266

266:                                              ; preds = %265
  %267 = call noundef i32 @_ZL9dirExistsPKc(ptr noundef nonnull @_ZZ25tinyfd_selectFolderDialogE5lBuff)
  %.not176 = icmp eq i32 %267, 0
  %spec.select177 = select i1 %.not176, ptr null, ptr @_ZZ25tinyfd_selectFolderDialogE5lBuff
  br label %268

268:                                              ; preds = %266, %244, %265, %254, %241, %243, %239, %198, %191, %182, %160, %130, %101, %94, %85, %70, %38, %8
  %.074 = phi ptr [ inttoptr (i64 1 to ptr), %8 ], [ inttoptr (i64 1 to ptr), %38 ], [ inttoptr (i64 1 to ptr), %70 ], [ inttoptr (i64 1 to ptr), %85 ], [ inttoptr (i64 1 to ptr), %94 ], [ inttoptr (i64 1 to ptr), %101 ], [ inttoptr (i64 1 to ptr), %182 ], [ null, %191 ], [ null, %198 ], [ %240, %239 ], [ inttoptr (i64 1 to ptr), %160 ], [ inttoptr (i64 1 to ptr), %130 ], [ null, %243 ], [ null, %241 ], [ null, %254 ], [ null, %265 ], [ %spec.select, %244 ], [ %spec.select177, %266 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #7
  ret ptr %.074
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL16ensureFinalSlashPc(ptr noundef) local_unnamed_addr #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass