; LLVM IR from fhanau/Efficient-Compression-Tool :: src/main.ll (Z11fileHandlerPKcRK10ECTOptionsi)

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

%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%struct.ECTOptions = type { i32, i32, i8, i8, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZL14processedfiles = external hidden global %"struct.std::atomic", align 8
@_ZL5bytes = external hidden global %"struct.std::atomic", align 8
@_ZL7savings = external hidden global %"struct.std::atomic.0", align 8
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11fileHandlerPKcRK10ECTOptionsi(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(40) %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %21 unwind label %69

21:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  %22 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str, i64 noundef -1) #6
  %23 = add i64 %22, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %23, i64 noundef -1)
          to label %24 unwind label %73

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.ECTOptions, ptr %25, i32 0, i32 6
  %27 = load i8, ptr %26, align 1, !tbaa !13, !range !16, !noundef !17
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %35

29:                                               ; preds = %24
  %30 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.1)
          to label %31 unwind label %77

31:                                               ; preds = %29
  br i1 %30, label %60, label %32

32:                                               ; preds = %31
  %33 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.2)
          to label %34 unwind label %77

34:                                               ; preds = %32
  br i1 %33, label %60, label %35

35:                                               ; preds = %34, %24
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ECTOptions, ptr %36, i32 0, i32 5
  %38 = load i8, ptr %37, align 4, !tbaa !18, !range !16, !noundef !17
  %39 = trunc i8 %38 to i1
  br i1 %39, label %40, label %52

40:                                               ; preds = %35
  %41 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.3)
          to label %42 unwind label %77

42:                                               ; preds = %40
  br i1 %41, label %60, label %43

43:                                               ; preds = %42
  %44 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.4)
          to label %45 unwind label %77

45:                                               ; preds = %43
  br i1 %44, label %60, label %46

46:                                               ; preds = %45
  %47 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.5)
          to label %48 unwind label %77

48:                                               ; preds = %46
  br i1 %47, label %60, label %49

49:                                               ; preds = %48
  %50 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.6)
          to label %51 unwind label %77

51:                                               ; preds = %49
  br i1 %50, label %60, label %52

52:                                               ; preds = %51, %35
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ECTOptions, ptr %53, i32 0, i32 10
  %55 = load i8, ptr %54, align 1, !tbaa !19, !range !16, !noundef !17
  %56 = trunc i8 %55 to i1
  br i1 %56, label %57, label %243

57:                                               ; preds = %52
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %243, label %60

60:                                               ; preds = %57, %51, %48, %45, %42, %34, %31
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ECTOptions, ptr %61, i32 0, i32 19
  %63 = load i8, ptr %62, align 4, !tbaa !20, !range !16, !noundef !17
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %81

65:                                               ; preds = %60
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = invoke noundef i64 @_Z13get_file_timePKc(ptr noundef %66)
          to label %68 unwind label %77

68:                                               ; preds = %65
  store i64 %67, ptr %13, align 8, !tbaa !11
  br label %81

69:                                               ; preds = %3
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %10, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %249

73:                                               ; preds = %21
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %10, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %11, align 4
  br label %248

77:                                               ; preds = %65, %49, %46, %43, %40, %32, %29
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %10, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %11, align 4
  br label %247

81:                                               ; preds = %68, %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = invoke noundef i64 @_Z8filesizePKc(ptr noundef %82)
          to label %84 unwind label %91

84:                                               ; preds = %81
  store i64 %83, ptr %15, align 8, !tbaa !21
  %85 = load i64, ptr %15, align 8, !tbaa !21
  %86 = icmp slt i64 %85, 0
  br i1 %86, label %87, label %95

87:                                               ; preds = %84
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %88)
          to label %90 unwind label %91

90:                                               ; preds = %87
  store i32 1, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %238

91:                                               ; preds = %87, %81
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %10, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %11, align 4
  br label %242

95:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  %96 = load i64, ptr %15, align 8, !tbaa !21
  %97 = icmp slt i64 %96, 1200000000
  br i1 %97, label %98, label %221

98:                                               ; preds = %95
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ECTOptions, ptr %99, i32 0, i32 10
  %101 = load i8, ptr %100, align 1, !tbaa !19, !range !16, !noundef !17
  %102 = trunc i8 %101 to i1
  br i1 %102, label %103, label %136

103:                                              ; preds = %98
  %104 = load i32, ptr %7, align 4, !tbaa !9
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %136, label %106

106:                                              ; preds = %103
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ECTOptions, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !23
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ECTOptions, ptr %111, i32 0, i32 17
  %113 = load i32, ptr %112, align 4, !tbaa !24
  %114 = trunc i32 %113 to i8
  %115 = load i64, ptr %15, align 8, !tbaa !21
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ECTOptions, ptr %116, i32 0, i32 11
  %118 = load i8, ptr %117, align 2, !tbaa !25, !range !16, !noundef !17
  %119 = trunc i8 %118 to i1
  %120 = zext i1 %119 to i32
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ECTOptions, ptr %121, i32 0, i32 8
  %123 = load i8, ptr %122, align 1, !tbaa !26, !range !16, !noundef !17
  %124 = trunc i8 %123 to i1
  %125 = zext i1 %124 to i32
  %126 = invoke noundef i32 @_ZL7ECTGzipPKcjhxji(ptr noundef %107, i32 noundef %110, i8 noundef zeroext %114, i64 noundef %115, i32 noundef %120, i32 noundef %125)
          to label %127 unwind label %131

127:                                              ; preds = %106
  store i32 %126, ptr %17, align 4, !tbaa !9
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = icmp eq i32 %128, 2
  br i1 %129, label %130, label %135

130:                                              ; preds = %127
  store i32 1, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %237

131:                                              ; preds = %232, %221, %182, %160, %157, %154, %151, %148, %142, %139, %136, %106
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %10, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %11, align 4
  br label %241

135:                                              ; preds = %127
  br label %168

136:                                              ; preds = %103, %98
  %137 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.1)
          to label %138 unwind label %131

138:                                              ; preds = %136
  br i1 %137, label %142, label %139

139:                                              ; preds = %138
  %140 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.2)
          to label %141 unwind label %131

141:                                              ; preds = %139
  br i1 %140, label %142, label %148

142:                                              ; preds = %141, %138
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = invoke noundef zeroext i8 @_ZL11OptimizePNGPKcRK10ECTOptions(ptr noundef %143, ptr noundef nonnull align 4 dereferenceable(40) %144)
          to label %146 unwind label %131

146:                                              ; preds = %142
  %147 = zext i8 %145 to i32
  store i32 %147, ptr %14, align 4, !tbaa !9
  br label %167

148:                                              ; preds = %141
  %149 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.3)
          to label %150 unwind label %131

150:                                              ; preds = %148
  br i1 %149, label %160, label %151

151:                                              ; preds = %150
  %152 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.4)
          to label %153 unwind label %131

153:                                              ; preds = %151
  br i1 %152, label %160, label %154

154:                                              ; preds = %153
  %155 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.5)
          to label %156 unwind label %131

156:                                              ; preds = %154
  br i1 %155, label %160, label %157

157:                                              ; preds = %156
  %158 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.6)
          to label %159 unwind label %131

159:                                              ; preds = %157
  br i1 %158, label %160, label %166

160:                                              ; preds = %159, %156, %153, %150
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = invoke noundef zeroext i8 @_ZL12OptimizeJPEGPKcRK10ECTOptions(ptr noundef %161, ptr noundef nonnull align 4 dereferenceable(40) %162)
          to label %164 unwind label %131

164:                                              ; preds = %160
  %165 = zext i8 %163 to i32
  store i32 %165, ptr %14, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %164, %159
  br label %167

167:                                              ; preds = %166, %146
  br label %168

168:                                              ; preds = %167, %135
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.ECTOptions, ptr %169, i32 0, i32 7
  %171 = load i8, ptr %170, align 2, !tbaa !27, !range !16, !noundef !17
  %172 = trunc i8 %171 to i1
  br i1 %172, label %173, label %220

173:                                              ; preds = %168
  %174 = load i32, ptr %7, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %220, label %176

176:                                              ; preds = %173
  %177 = call noundef i64 @_ZNSt13__atomic_baseImE9fetch_addEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL14processedfiles, i64 noundef 1, i32 noundef 5) #6
  %178 = load i64, ptr %15, align 8, !tbaa !21
  %179 = call noundef i64 @_ZNSt13__atomic_baseImE9fetch_addEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL5bytes, i64 noundef %178, i32 noundef 5) #6
  %180 = load i32, ptr %17, align 4, !tbaa !9
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %189, label %182

182:                                              ; preds = %176
  %183 = load i64, ptr %15, align 8, !tbaa !21
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = invoke noundef i64 @_Z8filesizePKc(ptr noundef %184)
          to label %186 unwind label %131

186:                                              ; preds = %182
  %187 = sub nsw i64 %183, %185
  %188 = call noundef i64 @_ZNSt13__atomic_baseIxE9fetch_addExSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL7savings, i64 noundef %187, i32 noundef 5) #6
  br label %219

189:                                              ; preds = %176
  %190 = load i32, ptr %17, align 4, !tbaa !9
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %218

192:                                              ; preds = %189
  %193 = load i64, ptr %15, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %194, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %195 unwind label %209

195:                                              ; preds = %192
  %196 = load ptr, ptr %6, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.ECTOptions, ptr %196, i32 0, i32 11
  %198 = load i8, ptr %197, align 2, !tbaa !25, !range !16, !noundef !17
  %199 = trunc i8 %198 to i1
  %200 = zext i1 %199 to i64
  %201 = select i1 %199, ptr @.str.8, ptr @.str.9
  %202 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %201)
          to label %203 unwind label %213

203:                                              ; preds = %195
  %204 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %202) #6
  %205 = invoke noundef i64 @_Z8filesizePKc(ptr noundef %204)
          to label %206 unwind label %213

206:                                              ; preds = %203
  %207 = sub nsw i64 %193, %205
  %208 = call noundef i64 @_ZNSt13__atomic_baseIxE9fetch_addExSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL7savings, i64 noundef %207, i32 noundef 5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %218

209:                                              ; preds = %192
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %10, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %11, align 4
  br label %217

213:                                              ; preds = %203, %195
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %10, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  br label %217

217:                                              ; preds = %213, %209
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %241

218:                                              ; preds = %206, %189
  br label %219

219:                                              ; preds = %218, %186
  br label %220

220:                                              ; preds = %219, %173, %168
  br label %224

221:                                              ; preds = %95
  %222 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10)
          to label %223 unwind label %131

223:                                              ; preds = %221
  br label %224

224:                                              ; preds = %223, %220
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.ECTOptions, ptr %225, i32 0, i32 19
  %227 = load i8, ptr %226, align 4, !tbaa !20, !range !16, !noundef !17
  %228 = trunc i8 %227 to i1
  br i1 %228, label %229, label %236

229:                                              ; preds = %224
  %230 = load i32, ptr %17, align 4, !tbaa !9
  %231 = icmp ne i32 %230, 0
  br i1 %231, label %236, label %232

232:                                              ; preds = %229
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = load i64, ptr %13, align 8, !tbaa !11
  invoke void @_Z13set_file_timePKcl(ptr noundef %233, i64 noundef %234)
          to label %235 unwind label %131

235:                                              ; preds = %232
  br label %236

236:                                              ; preds = %235, %229, %224
  store i32 0, ptr %16, align 4
  br label %237

237:                                              ; preds = %236, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %238

238:                                              ; preds = %237, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %239 = load i32, ptr %16, align 4
  switch i32 %239, label %245 [
    i32 0, label %240
  ]

240:                                              ; preds = %238
  br label %243

241:                                              ; preds = %217, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %242

242:                                              ; preds = %241, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %247

243:                                              ; preds = %240, %57, %52
  %244 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %244, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %245

245:                                              ; preds = %243, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  %246 = load i32, ptr %4, align 4
  ret i32 %246

247:                                              ; preds = %242, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %248

248:                                              ; preds = %247, %73
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %249

249:                                              ; preds = %248, %69
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %250

250:                                              ; preds = %249
  %251 = load ptr, ptr %10, align 8
  %252 = load i32, ptr %11, align 4
  %253 = insertvalue { ptr, i32 } poison, ptr %251, 0
  %254 = insertvalue { ptr, i32 } %253, i32 %252, 1
  resume { ptr, i32 } %254
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

declare noundef i64 @_Z13get_file_timePKc(ptr noundef) #4

declare noundef i64 @_Z8filesizePKc(ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL7ECTGzipPKcjhxji(ptr noundef, i32 noundef, i8 noundef zeroext, i64 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i8 @_ZL11OptimizePNGPKcRK10ECTOptions(ptr noundef, ptr noundef nonnull align 4 dereferenceable(40)) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i8 @_ZL12OptimizeJPEGPKcRK10ECTOptions(ptr noundef, ptr noundef nonnull align 4 dereferenceable(40)) #0

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseImE9fetch_addEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseIxE9fetch_addExSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare void @_Z13set_file_timePKcl(ptr noundef, i64 noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 #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 = { alwaysinline 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 }

!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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !15, i64 17}
!14 = !{!"_ZTS10ECTOptions", !10, i64 0, !10, i64 4, !15, i64 8, !15, i64 9, !10, i64 12, !15, i64 16, !15, i64 17, !15, i64 18, !15, i64 19, !15, i64 20, !15, i64 21, !15, i64 22, !15, i64 23, !15, i64 24, !15, i64 25, !15, i64 26, !15, i64 27, !10, i64 28, !10, i64 32, !15, i64 36}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!14, !15, i64 16}
!19 = !{!14, !15, i64 21}
!20 = !{!14, !15, i64 36}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !7, i64 0}
!23 = !{!14, !10, i64 0}
!24 = !{!14, !10, i64 28}
!25 = !{!14, !15, i64 22}
!26 = !{!14, !15, i64 19}
!27 = !{!14, !15, i64 18}


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

%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZL14processedfiles = external hidden global %"struct.std::atomic", align 8
@_ZL5bytes = external hidden global %"struct.std::atomic", align 8
@_ZL7savings = external hidden global %"struct.std::atomic.0", align 8
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11fileHandlerPKcRK10ECTOptionsi(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(40) %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %9 unwind label %43

9:                                                ; preds = %3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %10 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str, i64 noundef -1) #7
  %11 = add i64 %10, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %11, i64 noundef -1)
          to label %12 unwind label %45

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %1, i64 17
  %14 = load i8, ptr %13, align 1, !tbaa !5, !range !11, !noundef !12
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %16, label %20

16:                                               ; preds = %12
  %17 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.1)
  br i1 %17, label %37, label %18

18:                                               ; preds = %16
  %19 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.2)
  br i1 %19, label %37, label %20

20:                                               ; preds = %18, %12
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  %22 = load i8, ptr %21, align 4, !tbaa !13, !range !11, !noundef !12
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %24, label %32

24:                                               ; preds = %20
  %25 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.3)
  br i1 %25, label %37, label %26

26:                                               ; preds = %24
  %27 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.4)
  br i1 %27, label %37, label %28

28:                                               ; preds = %26
  %29 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.5)
  br i1 %29, label %37, label %30

30:                                               ; preds = %28
  %31 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.6)
  br i1 %31, label %37, label %32

32:                                               ; preds = %30, %20
  %33 = getelementptr inbounds i8, ptr %1, i64 21
  %34 = load i8, ptr %33, align 1, !tbaa !14, !range !11, !noundef !12
  %35 = trunc nuw i8 %34 to i1
  %36 = icmp eq i32 %2, 0
  %or.cond.not = and i1 %36, %35
  br i1 %or.cond.not, label %37, label %132

37:                                               ; preds = %32, %30, %28, %26, %24, %18, %16
  %38 = getelementptr inbounds i8, ptr %1, i64 36
  %39 = load i8, ptr %38, align 4, !tbaa !15, !range !11, !noundef !12
  %40 = trunc nuw i8 %39 to i1
  br i1 %40, label %41, label %49

41:                                               ; preds = %37
  %42 = invoke noundef i64 @_Z13get_file_timePKc(ptr noundef %0)
          to label %49 unwind label %47

43:                                               ; preds = %3
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %135

45:                                               ; preds = %9
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %134

47:                                               ; preds = %41
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %133

49:                                               ; preds = %41, %37
  %.059 = phi i64 [ 0, %37 ], [ %42, %41 ]
  %50 = invoke noundef i64 @_Z8filesizePKc(ptr noundef %0)
          to label %51 unwind label %55

51:                                               ; preds = %49
  %52 = icmp slt i64 %50, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %51
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %0)
  br label %132

55:                                               ; preds = %49
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %133

57:                                               ; preds = %51
  %58 = icmp ult i64 %50, 1200000000
  br i1 %58, label %59, label %125

59:                                               ; preds = %57
  %60 = getelementptr inbounds i8, ptr %1, i64 21
  %61 = load i8, ptr %60, align 1, !tbaa !14, !range !11, !noundef !12
  %62 = trunc nuw i8 %61 to i1
  %.not2 = xor i1 %62, true
  %63 = icmp ne i32 %2, 0
  %or.cond4 = or i1 %63, %.not2
  br i1 %or.cond4, label %80, label %64

64:                                               ; preds = %59
  %65 = load i32, ptr %1, align 4, !tbaa !16
  %66 = getelementptr inbounds i8, ptr %1, i64 28
  %67 = load i32, ptr %66, align 4, !tbaa !17
  %68 = trunc i32 %67 to i8
  %69 = getelementptr inbounds i8, ptr %1, i64 22
  %70 = load i8, ptr %69, align 2, !tbaa !18, !range !11, !noundef !12
  %71 = zext nneg i8 %70 to i32
  %72 = getelementptr inbounds i8, ptr %1, i64 19
  %73 = load i8, ptr %72, align 1, !tbaa !19, !range !11, !noundef !12
  %74 = zext nneg i8 %73 to i32
  %75 = invoke noundef i32 @_ZL7ECTGzipPKcjhxji(ptr noundef %0, i32 noundef %65, i8 noundef zeroext %68, i64 noundef %50, i32 noundef %71, i32 noundef %74)
          to label %76 unwind label %78

76:                                               ; preds = %64
  %77 = icmp eq i32 %75, 2
  br i1 %77, label %132, label %96

78:                                               ; preds = %131, %103, %94, %84, %64
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %133

80:                                               ; preds = %59
  %81 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.1)
  br i1 %81, label %84, label %82

82:                                               ; preds = %80
  %83 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.2)
  br i1 %83, label %84, label %86

84:                                               ; preds = %82, %80
  %85 = invoke noundef zeroext i8 @_ZL11OptimizePNGPKcRK10ECTOptions(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(40) %1)
          to label %96 unwind label %78

86:                                               ; preds = %82
  %87 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.3)
  br i1 %87, label %94, label %88

88:                                               ; preds = %86
  %89 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.4)
  br i1 %89, label %94, label %90

90:                                               ; preds = %88
  %91 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.5)
  br i1 %91, label %94, label %92

92:                                               ; preds = %90
  %93 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.6)
  br i1 %93, label %94, label %96

94:                                               ; preds = %92, %90, %88, %86
  %95 = invoke noundef zeroext i8 @_ZL12OptimizeJPEGPKcRK10ECTOptions(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(40) %1)
          to label %96 unwind label %78

96:                                               ; preds = %94, %84, %92, %76
  %.056.shrunk = phi i8 [ 0, %92 ], [ 0, %76 ], [ %85, %84 ], [ %95, %94 ]
  %.0 = phi i32 [ 0, %92 ], [ %75, %76 ], [ 0, %84 ], [ 0, %94 ]
  %97 = getelementptr inbounds i8, ptr %1, i64 18
  %98 = load i8, ptr %97, align 2, !tbaa !20, !range !11, !noundef !12
  %99 = trunc nuw i8 %98 to i1
  %.not5 = xor i1 %99, true
  %or.cond7 = or i1 %63, %.not5
  br i1 %or.cond7, label %127, label %100

100:                                              ; preds = %96
  %101 = call noundef i64 @_ZNSt13__atomic_baseImE9fetch_addEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL14processedfiles, i64 noundef 1, i32 noundef 5) #7
  %102 = call noundef i64 @_ZNSt13__atomic_baseImE9fetch_addEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL5bytes, i64 noundef %50, i32 noundef 5) #7
  %.not = icmp eq i32 %.0, 0
  br i1 %.not, label %103, label %108

103:                                              ; preds = %100
  %104 = invoke noundef i64 @_Z8filesizePKc(ptr noundef %0)
          to label %105 unwind label %78

105:                                              ; preds = %103
  %106 = sub nsw i64 %50, %104
  %107 = call noundef i64 @_ZNSt13__atomic_baseIxE9fetch_addExSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL7savings, i64 noundef %106, i32 noundef 5) #7
  br label %127

108:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %109 unwind label %120

109:                                              ; preds = %108
  %110 = getelementptr inbounds i8, ptr %1, i64 22
  %111 = load i8, ptr %110, align 2, !tbaa !18, !range !11, !noundef !12
  %112 = trunc nuw i8 %111 to i1
  %113 = select i1 %112, ptr @.str.8, ptr @.str.9
  %114 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull %113)
          to label %115 unwind label %122

115:                                              ; preds = %109
  %116 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %114) #7
  %117 = invoke noundef i64 @_Z8filesizePKc(ptr noundef %116)
          to label %.thread unwind label %122

.thread:                                          ; preds = %115
  %118 = sub nsw i64 %50, %117
  %119 = call noundef i64 @_ZNSt13__atomic_baseIxE9fetch_addExSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) @_ZL7savings, i64 noundef %118, i32 noundef 5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %132

120:                                              ; preds = %108
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %124

122:                                              ; preds = %115, %109
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %124

124:                                              ; preds = %122, %120
  %.pn = phi { ptr, i32 } [ %123, %122 ], [ %121, %120 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %133

125:                                              ; preds = %57
  %126 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %127

127:                                              ; preds = %96, %105, %125
  %.157.shrunk = phi i8 [ %.056.shrunk, %96 ], [ %.056.shrunk, %105 ], [ 0, %125 ]
  %.1 = phi i32 [ %.0, %96 ], [ 0, %105 ], [ 0, %125 ]
  %128 = load i8, ptr %38, align 4, !tbaa !15, !range !11, !noundef !12
  %129 = trunc nuw i8 %128 to i1
  %130 = icmp eq i32 %.1, 0
  %or.cond10.not = and i1 %130, %129
  br i1 %or.cond10.not, label %131, label %132

131:                                              ; preds = %127
  invoke void @_Z13set_file_timePKcl(ptr noundef %0, i64 noundef %.059)
          to label %132 unwind label %78

132:                                              ; preds = %76, %53, %131, %127, %.thread, %32
  %.2.shrunk = phi i8 [ 0, %32 ], [ 1, %76 ], [ 1, %53 ], [ %.056.shrunk, %.thread ], [ %.157.shrunk, %127 ], [ %.157.shrunk, %131 ]
  %.2 = zext i8 %.2.shrunk to i32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  ret i32 %.2

133:                                              ; preds = %55, %124, %78, %47
  %.pn76.pn.pn = phi { ptr, i32 } [ %48, %47 ], [ %56, %55 ], [ %79, %78 ], [ %.pn, %124 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %134

134:                                              ; preds = %133, %45
  %.pn76.pn.pn.pn = phi { ptr, i32 } [ %.pn76.pn.pn, %133 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %135

135:                                              ; preds = %134, %43
  %.pn76.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn76.pn.pn.pn, %134 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn76.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

declare noundef i64 @_Z13get_file_timePKc(ptr noundef) local_unnamed_addr #4

declare noundef i64 @_Z8filesizePKc(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL7ECTGzipPKcjhxji(ptr noundef, i32 noundef, i8 noundef zeroext, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i8 @_ZL11OptimizePNGPKcRK10ECTOptions(ptr noundef, ptr noundef nonnull align 4 dereferenceable(40)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i8 @_ZL12OptimizeJPEGPKcRK10ECTOptions(ptr noundef, ptr noundef nonnull align 4 dereferenceable(40)) local_unnamed_addr #0

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseImE9fetch_addEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseIxE9fetch_addExSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare void @_Z13set_file_timePKcl(ptr noundef, i64 noundef) local_unnamed_addr #4

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

!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, !10, i64 17}
!6 = !{!"_ZTS10ECTOptions", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 9, !7, i64 12, !10, i64 16, !10, i64 17, !10, i64 18, !10, i64 19, !10, i64 20, !10, i64 21, !10, i64 22, !10, i64 23, !10, i64 24, !10, i64 25, !10, i64 26, !10, i64 27, !7, i64 28, !7, i64 32, !10, i64 36}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!6, !10, i64 16}
!14 = !{!6, !10, i64 21}
!15 = !{!6, !10, i64 36}
!16 = !{!6, !7, i64 0}
!17 = !{!6, !7, i64 28}
!18 = !{!6, !10, i64 22}
!19 = !{!6, !10, i64 19}
!20 = !{!6, !10, i64 18}


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