; LLVM IR from team-charls/charls :: test (main)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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 }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.0 }
%union.anon.0 = type { i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [166 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %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::basic_ifstream", align 8
  %13 = alloca %"class.std::basic_ifstream", align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %27

25:                                               ; preds = %2
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 1, ptr %3, align 4
  br label %341

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %335, %27
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp ne i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 2, ptr %7, align 4
  br label %338

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #8
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %38, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %39 unwind label %46

39:                                               ; preds = %33
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  %40 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.1)
          to label %41 unwind label %50

41:                                               ; preds = %39
  br i1 %40, label %42, label %54

42:                                               ; preds = %41
  %43 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_19unit_testEv()
          to label %44 unwind label %50

44:                                               ; preds = %42
  %45 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %43) #8
  store i32 %45, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

46:                                               ; preds = %33
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %10, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  br label %334

50:                                               ; preds = %328, %321, %319, %269, %219, %217, %213, %163, %161, %158, %129, %120, %110, %107, %98, %88, %85, %76, %66, %63, %54, %42, %39
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %10, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %11, align 4
  br label %333

54:                                               ; preds = %41
  %55 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.2)
          to label %56 unwind label %50

56:                                               ; preds = %54
  br i1 %55, label %57, label %76

57:                                               ; preds = %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = icmp ne i32 %58, 1
  br i1 %59, label %63, label %60

60:                                               ; preds = %57
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = icmp ne i32 %61, 4
  br i1 %62, label %63, label %66

63:                                               ; preds = %60, %57
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %65 unwind label %50

65:                                               ; preds = %63
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

66:                                               ; preds = %60
  %67 = load ptr, ptr %5, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 2
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = load ptr, ptr %5, align 8, !tbaa !9
  %71 = getelementptr inbounds ptr, ptr %70, i64 3
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_110decode_rawEPKcS1_(ptr noundef %69, ptr noundef %72)
          to label %74 unwind label %50

74:                                               ; preds = %66
  %75 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %73) #8
  store i32 %75, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

76:                                               ; preds = %56
  %77 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.4)
          to label %78 unwind label %50

78:                                               ; preds = %76
  br i1 %77, label %79, label %98

79:                                               ; preds = %78
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = icmp ne i32 %80, 1
  br i1 %81, label %85, label %82

82:                                               ; preds = %79
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = icmp ne i32 %83, 4
  br i1 %84, label %85, label %88

85:                                               ; preds = %82, %79
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
          to label %87 unwind label %50

87:                                               ; preds = %85
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

88:                                               ; preds = %82
  %89 = load ptr, ptr %5, align 8, !tbaa !9
  %90 = getelementptr inbounds ptr, ptr %89, i64 2
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %92, i64 3
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_113decode_to_pnmEPKcS1_(ptr noundef %91, ptr noundef %94)
          to label %96 unwind label %50

96:                                               ; preds = %88
  %97 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %95) #8
  store i32 %97, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

98:                                               ; preds = %78
  %99 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.6)
          to label %100 unwind label %50

100:                                              ; preds = %98
  br i1 %99, label %101, label %120

101:                                              ; preds = %100
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = icmp ne i32 %102, 1
  br i1 %103, label %107, label %104

104:                                              ; preds = %101
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 4
  br i1 %106, label %107, label %110

107:                                              ; preds = %104, %101
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
          to label %109 unwind label %50

109:                                              ; preds = %107
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

110:                                              ; preds = %104
  %111 = load ptr, ptr %5, align 8, !tbaa !9
  %112 = getelementptr inbounds ptr, ptr %111, i64 2
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !9
  %115 = getelementptr inbounds ptr, ptr %114, i64 3
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_110encode_pnmEPKcS1_(ptr noundef %113, ptr noundef %116)
          to label %118 unwind label %50

118:                                              ; preds = %110
  %119 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %117) #8
  store i32 %119, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

120:                                              ; preds = %100
  %121 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.8)
          to label %122 unwind label %50

122:                                              ; preds = %120
  br i1 %121, label %123, label %158

123:                                              ; preds = %122
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = icmp ne i32 %124, 1
  br i1 %125, label %129, label %126

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

129:                                              ; preds = %126, %123
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
          to label %131 unwind label %50

131:                                              ; preds = %129
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

132:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 520, ptr %12) #8
  %133 = load ptr, ptr %5, align 8, !tbaa !9
  %134 = getelementptr inbounds ptr, ptr %133, i64 2
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %12, ptr noundef %135, i32 noundef 12)
          to label %136 unwind label %144

136:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 520, ptr %13) #8
  %137 = load ptr, ptr %5, align 8, !tbaa !9
  %138 = getelementptr inbounds ptr, ptr %137, i64 3
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %13, ptr noundef %139, i32 noundef 12)
          to label %140 unwind label %148

140:                                              ; preds = %136
  %141 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_111compare_pnmERSiS0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %142 unwind label %152

142:                                              ; preds = %140
  %143 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %141) #8
  store i32 %143, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %13) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %13) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %12) #8
  br label %331

144:                                              ; preds = %132
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %10, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %11, align 4
  br label %157

148:                                              ; preds = %136
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %10, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %11, align 4
  br label %156

152:                                              ; preds = %140
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %10, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %11, align 4
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %13) #8
  br label %156

156:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 520, ptr %13) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #8
  br label %157

157:                                              ; preds = %156, %144
  call void @llvm.lifetime.end.p0(i64 520, ptr %12) #8
  br label %333

158:                                              ; preds = %122
  %159 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.9)
          to label %160 unwind label %50

160:                                              ; preds = %158
  br i1 %159, label %161, label %163

161:                                              ; preds = %160
  invoke void @_Z24damaged_bit_stream_testsv()
          to label %162 unwind label %50

162:                                              ; preds = %161
  store i32 4, ptr %7, align 4
  br label %331

163:                                              ; preds = %160
  %164 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef 0, i64 noundef 12, ptr noundef @.str.10)
          to label %165 unwind label %50

165:                                              ; preds = %163
  %166 = icmp eq i32 %164, 0
  br i1 %166, label %167, label %213

167:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %168 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32) %8, i8 noundef signext 58, i64 noundef 0) #8
  store i64 %168, ptr %15, align 8, !tbaa !11
  %169 = load i64, ptr %15, align 8, !tbaa !11
  %170 = icmp ne i64 %169, -1
  br i1 %170, label %171, label %200

171:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  %172 = load i64, ptr %15, align 8, !tbaa !11
  %173 = add i64 %172, 1
  store i64 %173, ptr %15, align 8, !tbaa !11
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %173, i64 noundef -1)
          to label %174 unwind label %186

174:                                              ; preds = %171
  %175 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef null, i32 noundef 10)
          to label %176 unwind label %190

176:                                              ; preds = %174
  store i32 %175, ptr %14, align 4, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  %177 = load i32, ptr %14, align 4, !tbaa !5
  %178 = icmp slt i32 %177, 1
  br i1 %178, label %179, label %199

179:                                              ; preds = %176
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
          to label %181 unwind label %195

181:                                              ; preds = %179
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %183 unwind label %195

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @.str.12)
          to label %185 unwind label %195

185:                                              ; preds = %183
  store i32 2, ptr %7, align 4
  br label %201

186:                                              ; preds = %171
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %10, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %11, align 4
  br label %194

190:                                              ; preds = %174
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %10, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %194

194:                                              ; preds = %190, %186
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %206

195:                                              ; preds = %183, %181, %179
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %10, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %11, align 4
  br label %206

199:                                              ; preds = %176
  br label %200

200:                                              ; preds = %199, %167
  store i32 0, ptr %7, align 4
  br label %201

201:                                              ; preds = %200, %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %202 = load i32, ptr %7, align 4
  switch i32 %202, label %211 [
    i32 0, label %203
  ]

203:                                              ; preds = %201
  %204 = load i32, ptr %14, align 4, !tbaa !5
  invoke void @_Z17performance_testsi(i32 noundef %204)
          to label %205 unwind label %207

205:                                              ; preds = %203
  store i32 4, ptr %7, align 4
  br label %211

206:                                              ; preds = %195, %194
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %212

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

211:                                              ; preds = %205, %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %331

212:                                              ; preds = %207, %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %333

213:                                              ; preds = %165
  %214 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef 0, i64 noundef 17, ptr noundef @.str.13)
          to label %215 unwind label %50

215:                                              ; preds = %213
  %216 = icmp eq i32 %214, 0
  br i1 %216, label %217, label %219

217:                                              ; preds = %215
  invoke void @_Z33test_large_image_performance_rgb8i(i32 noundef 1)
          to label %218 unwind label %50

218:                                              ; preds = %217
  store i32 4, ptr %7, align 4
  br label %331

219:                                              ; preds = %215
  %220 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef 0, i64 noundef 18, ptr noundef @.str.14)
          to label %221 unwind label %50

221:                                              ; preds = %219
  %222 = icmp eq i32 %220, 0
  br i1 %222, label %223, label %269

223:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %224 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32) %8, i8 noundef signext 58, i64 noundef 0) #8
  store i64 %224, ptr %18, align 8, !tbaa !11
  %225 = load i64, ptr %18, align 8, !tbaa !11
  %226 = icmp ne i64 %225, -1
  br i1 %226, label %227, label %256

227:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #8
  %228 = load i64, ptr %18, align 8, !tbaa !11
  %229 = add i64 %228, 1
  store i64 %229, ptr %18, align 8, !tbaa !11
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %229, i64 noundef -1)
          to label %230 unwind label %242

230:                                              ; preds = %227
  %231 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef null, i32 noundef 10)
          to label %232 unwind label %246

232:                                              ; preds = %230
  store i32 %231, ptr %17, align 4, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  %233 = load i32, ptr %17, align 4, !tbaa !5
  %234 = icmp slt i32 %233, 1
  br i1 %234, label %235, label %255

235:                                              ; preds = %232
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.15)
          to label %237 unwind label %251

237:                                              ; preds = %235
  %238 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %236, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %239 unwind label %251

239:                                              ; preds = %237
  %240 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef @.str.12)
          to label %241 unwind label %251

241:                                              ; preds = %239
  store i32 2, ptr %7, align 4
  br label %257

242:                                              ; preds = %227
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %10, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %11, align 4
  br label %250

246:                                              ; preds = %230
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %10, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  br label %250

250:                                              ; preds = %246, %242
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  br label %262

251:                                              ; preds = %239, %237, %235
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %10, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %11, align 4
  br label %262

255:                                              ; preds = %232
  br label %256

256:                                              ; preds = %255, %223
  store i32 0, ptr %7, align 4
  br label %257

257:                                              ; preds = %256, %241
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %258 = load i32, ptr %7, align 4
  switch i32 %258, label %267 [
    i32 0, label %259
  ]

259:                                              ; preds = %257
  %260 = load i32, ptr %17, align 4, !tbaa !5
  invoke void @_Z24decode_performance_testsi(i32 noundef %260)
          to label %261 unwind label %263

261:                                              ; preds = %259
  store i32 4, ptr %7, align 4
  br label %267

262:                                              ; preds = %251, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %268

263:                                              ; preds = %259
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %10, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %11, align 4
  br label %268

267:                                              ; preds = %261, %257
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %331

268:                                              ; preds = %263, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %333

269:                                              ; preds = %221
  %270 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef 0, i64 noundef 19, ptr noundef @.str.16)
          to label %271 unwind label %50

271:                                              ; preds = %269
  %272 = icmp eq i32 %270, 0
  br i1 %272, label %273, label %319

273:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 1, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %274 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32) %8, i8 noundef signext 58, i64 noundef 0) #8
  store i64 %274, ptr %21, align 8, !tbaa !11
  %275 = load i64, ptr %21, align 8, !tbaa !11
  %276 = icmp ne i64 %275, -1
  br i1 %276, label %277, label %306

277:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #8
  %278 = load i64, ptr %21, align 8, !tbaa !11
  %279 = add i64 %278, 1
  store i64 %279, ptr %21, align 8, !tbaa !11
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %279, i64 noundef -1)
          to label %280 unwind label %292

280:                                              ; preds = %277
  %281 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef null, i32 noundef 10)
          to label %282 unwind label %296

282:                                              ; preds = %280
  store i32 %281, ptr %20, align 4, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #8
  %283 = load i32, ptr %20, align 4, !tbaa !5
  %284 = icmp slt i32 %283, 1
  br i1 %284, label %285, label %305

285:                                              ; preds = %282
  %286 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.15)
          to label %287 unwind label %301

287:                                              ; preds = %285
  %288 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %286, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %289 unwind label %301

289:                                              ; preds = %287
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %288, ptr noundef @.str.12)
          to label %291 unwind label %301

291:                                              ; preds = %289
  store i32 2, ptr %7, align 4
  br label %307

292:                                              ; preds = %277
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %10, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %11, align 4
  br label %300

296:                                              ; preds = %280
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %10, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  br label %300

300:                                              ; preds = %296, %292
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #8
  br label %312

301:                                              ; preds = %289, %287, %285
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %10, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %11, align 4
  br label %312

305:                                              ; preds = %282
  br label %306

306:                                              ; preds = %305, %273
  store i32 0, ptr %7, align 4
  br label %307

307:                                              ; preds = %306, %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  %308 = load i32, ptr %7, align 4
  switch i32 %308, label %317 [
    i32 0, label %309
  ]

309:                                              ; preds = %307
  %310 = load i32, ptr %20, align 4, !tbaa !5
  invoke void @_Z24encode_performance_testsi(i32 noundef %310)
          to label %311 unwind label %313

311:                                              ; preds = %309
  store i32 4, ptr %7, align 4
  br label %317

312:                                              ; preds = %301, %300
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %318

313:                                              ; preds = %309
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %10, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %11, align 4
  br label %318

317:                                              ; preds = %311, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %331

318:                                              ; preds = %313, %312
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %333

319:                                              ; preds = %271
  %320 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.17)
          to label %321 unwind label %50

321:                                              ; preds = %319
  %322 = load ptr, ptr %5, align 8, !tbaa !9
  %323 = load i32, ptr %6, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds ptr, ptr %322, i64 %324
  %326 = load ptr, ptr %325, align 8, !tbaa !9
  %327 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %320, ptr noundef %326)
          to label %328 unwind label %50

328:                                              ; preds = %321
  %329 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %327, ptr noundef @.str.12)
          to label %330 unwind label %50

330:                                              ; preds = %328
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %331

331:                                              ; preds = %330, %317, %267, %218, %211, %162, %142, %131, %118, %109, %96, %87, %74, %65, %44
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  %332 = load i32, ptr %7, align 4
  switch i32 %332, label %338 [
    i32 4, label %335
  ]

333:                                              ; preds = %318, %268, %212, %157, %50
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %334

334:                                              ; preds = %333, %46
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %343

335:                                              ; preds = %331
  %336 = load i32, ptr %6, align 4, !tbaa !5
  %337 = add nsw i32 %336, 1
  store i32 %337, ptr %6, align 4, !tbaa !5
  br label %28, !llvm.loop !13

338:                                              ; preds = %331, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %339 = load i32, ptr %7, align 4
  switch i32 %339, label %348 [
    i32 2, label %340
    i32 1, label %341
  ]

340:                                              ; preds = %338
  store i32 0, ptr %3, align 4
  br label %341

341:                                              ; preds = %340, %338, %25
  %342 = load i32, ptr %3, align 4
  ret i32 %342

343:                                              ; preds = %334
  %344 = load ptr, ptr %10, align 8
  %345 = load i32, ptr %11, align 4
  %346 = insertvalue { ptr, i32 } poison, ptr %344, 0
  %347 = insertvalue { ptr, i32 } %346, i32 %345, 1
  resume { ptr, i32 } %347

348:                                              ; preds = %338
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #4 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 #3 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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) #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_19unit_testEv() #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_110decode_rawEPKcS1_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_113decode_to_pnmEPKcS1_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_110encode_pnmEPKcS1_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_111compare_pnmERSiS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

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

declare void @_Z24damaged_bit_stream_testsv() #6

declare noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef, ptr noundef) #6

; Function Attrs: nounwind
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext, i64 noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #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) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare void @_Z17performance_testsi(i32 noundef) #6

declare void @_Z33test_large_image_performance_rgb8i(i32 noundef) #6

declare void @_Z24decode_performance_testsi(i32 noundef) #6

declare void @_Z24encode_performance_testsi(i32 noundef) #6

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

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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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 }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.0 }
%union.anon.0 = type { i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [166 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::basic_ifstream", align 8
  %6 = alloca %"class.std::basic_ifstream", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = icmp eq i32 %0, 1
  br i1 %10, label %12, label %.preheader.preheader

.preheader.preheader:                             ; preds = %2
  %11 = zext i32 %0 to i64
  br label %.preheader

12:                                               ; preds = %2
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %.loopexit

.preheader:                                       ; preds = %.preheader.preheader, %190
  %indvars.iv = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next, %190 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  %14 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %16 unwind label %22

16:                                               ; preds = %.preheader
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  %17 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.1)
  br i1 %17, label %18, label %24

18:                                               ; preds = %16
  %19 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_19unit_testEv()
          to label %20 unwind label %.loopexit.split-lp

20:                                               ; preds = %18
  %21 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %19) #8
  br label %.thread138

22:                                               ; preds = %.preheader
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  br label %189

.loopexit142:                                     ; preds = %91, %92, %120, %124, %125, %153
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %188

.loopexit.split-lp:                               ; preds = %.invoke, %18, %32, %45, %58, %181, %183
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %188

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

26:                                               ; preds = %24
  %27 = icmp ne i64 %indvars.iv, 1
  %28 = icmp ne i32 %0, 4
  %or.cond = or i1 %28, %27
  br i1 %or.cond, label %.invoke, label %32

.invoke:                                          ; preds = %183, %68, %55, %42, %26
  %29 = phi ptr [ @_ZSt4cout, %26 ], [ @_ZSt4cout, %42 ], [ @_ZSt4cout, %55 ], [ @_ZSt4cout, %68 ], [ %186, %183 ]
  %30 = phi ptr [ @.str.3, %26 ], [ @.str.5, %42 ], [ @.str.7, %55 ], [ @.str.7, %68 ], [ @.str.12, %183 ]
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull %30)
          to label %.thread138 unwind label %.loopexit.split-lp

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %1, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_110decode_rawEPKcS1_(ptr noundef %34, ptr noundef %36)
          to label %38 unwind label %.loopexit.split-lp

38:                                               ; preds = %32
  %39 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %37) #8
  br label %.thread138

40:                                               ; preds = %24
  %41 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.4)
  br i1 %41, label %42, label %53

42:                                               ; preds = %40
  %43 = icmp ne i64 %indvars.iv, 1
  %44 = icmp ne i32 %0, 4
  %or.cond6 = or i1 %44, %43
  br i1 %or.cond6, label %.invoke, label %45

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %1, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %1, i64 24
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_113decode_to_pnmEPKcS1_(ptr noundef %47, ptr noundef %49)
          to label %51 unwind label %.loopexit.split-lp

51:                                               ; preds = %45
  %52 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %50) #8
  br label %.thread138

53:                                               ; preds = %40
  %54 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.6)
  br i1 %54, label %55, label %66

55:                                               ; preds = %53
  %56 = icmp ne i64 %indvars.iv, 1
  %57 = icmp ne i32 %0, 4
  %or.cond8 = or i1 %57, %56
  br i1 %or.cond8, label %.invoke, label %58

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %1, i64 16
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %1, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_110encode_pnmEPKcS1_(ptr noundef %60, ptr noundef %62)
          to label %64 unwind label %.loopexit.split-lp

64:                                               ; preds = %58
  %65 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %63) #8
  br label %.thread138

66:                                               ; preds = %53
  %67 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.8)
  br i1 %67, label %68, label %89

68:                                               ; preds = %66
  %69 = icmp ne i64 %indvars.iv, 1
  %70 = icmp ne i32 %0, 4
  %or.cond10 = or i1 %70, %69
  br i1 %or.cond10, label %.invoke, label %71

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %5) #8
  %72 = getelementptr inbounds i8, ptr %1, i64 16
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef %73, i32 noundef 12)
          to label %74 unwind label %81

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %6) #8
  %75 = getelementptr inbounds i8, ptr %1, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %6, ptr noundef %76, i32 noundef 12)
          to label %77 unwind label %83

77:                                               ; preds = %74
  %78 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_111compare_pnmERSiS0_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %79 unwind label %85

79:                                               ; preds = %77
  %80 = call noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext %78) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %6) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #8
  br label %.thread138

81:                                               ; preds = %71
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %88

83:                                               ; preds = %74
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %77
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6) #8
  br label %87

87:                                               ; preds = %85, %83
  %.pn115 = phi { ptr, i32 } [ %86, %85 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %6) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #8
  br label %88

88:                                               ; preds = %87, %81
  %.pn115.pn = phi { ptr, i32 } [ %.pn115, %87 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #8
  br label %188

89:                                               ; preds = %66
  %90 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.9)
  br i1 %90, label %91, label %92

91:                                               ; preds = %89
  invoke void @_Z24damaged_bit_stream_testsv()
          to label %190 unwind label %.loopexit142

92:                                               ; preds = %89
  %93 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef 0, i64 noundef 12, ptr noundef nonnull @.str.10)
          to label %94 unwind label %.loopexit142

94:                                               ; preds = %92
  %95 = icmp eq i32 %93, 0
  br i1 %95, label %96, label %120

96:                                               ; preds = %94
  %97 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32) %3, i8 noundef signext 58, i64 noundef 0) #8
  %.not108 = icmp eq i64 %97, -1
  br i1 %.not108, label %117, label %98

98:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  %99 = add nuw i64 %97, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %99, i64 noundef -1)
          to label %100 unwind label %110

100:                                              ; preds = %98
  %101 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef null, i32 noundef 10)
          to label %102 unwind label %112

102:                                              ; preds = %100
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  %103 = icmp slt i32 %101, 1
  br i1 %103, label %104, label %117

104:                                              ; preds = %102
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
          to label %106 unwind label %115

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %108 unwind label %115

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull @.str.12)
          to label %.thread138 unwind label %115

110:                                              ; preds = %98
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %114

112:                                              ; preds = %100
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %114

114:                                              ; preds = %112, %110
  %.pn109 = phi { ptr, i32 } [ %113, %112 ], [ %111, %110 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br label %188

115:                                              ; preds = %108, %106, %104
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %188

117:                                              ; preds = %102, %96
  %.156.ph = phi i32 [ 1, %96 ], [ %101, %102 ]
  invoke void @_Z17performance_testsi(i32 noundef %.156.ph)
          to label %190 unwind label %118

118:                                              ; preds = %117
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %188

120:                                              ; preds = %94
  %121 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef 0, i64 noundef 17, ptr noundef nonnull @.str.13)
          to label %122 unwind label %.loopexit142

122:                                              ; preds = %120
  %123 = icmp eq i32 %121, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %122
  invoke void @_Z33test_large_image_performance_rgb8i(i32 noundef 1)
          to label %190 unwind label %.loopexit142

125:                                              ; preds = %122
  %126 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef 0, i64 noundef 18, ptr noundef nonnull @.str.14)
          to label %127 unwind label %.loopexit142

127:                                              ; preds = %125
  %128 = icmp eq i32 %126, 0
  br i1 %128, label %129, label %153

129:                                              ; preds = %127
  %130 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32) %3, i8 noundef signext 58, i64 noundef 0) #8
  %.not101 = icmp eq i64 %130, -1
  br i1 %.not101, label %150, label %131

131:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  %132 = add nuw i64 %130, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %132, i64 noundef -1)
          to label %133 unwind label %143

133:                                              ; preds = %131
  %134 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef null, i32 noundef 10)
          to label %135 unwind label %145

135:                                              ; preds = %133
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  %136 = icmp slt i32 %134, 1
  br i1 %136, label %137, label %150

137:                                              ; preds = %135
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.15)
          to label %139 unwind label %148

139:                                              ; preds = %137
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %141 unwind label %148

141:                                              ; preds = %139
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %140, ptr noundef nonnull @.str.12)
          to label %.thread138 unwind label %148

143:                                              ; preds = %131
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %147

145:                                              ; preds = %133
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %147

147:                                              ; preds = %145, %143
  %.pn102 = phi { ptr, i32 } [ %146, %145 ], [ %144, %143 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %188

148:                                              ; preds = %141, %139, %137
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %188

150:                                              ; preds = %135, %129
  %.154.ph = phi i32 [ 1, %129 ], [ %134, %135 ]
  invoke void @_Z24decode_performance_testsi(i32 noundef %.154.ph)
          to label %190 unwind label %151

151:                                              ; preds = %150
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %188

153:                                              ; preds = %127
  %154 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef 0, i64 noundef 19, ptr noundef nonnull @.str.16)
          to label %155 unwind label %.loopexit142

155:                                              ; preds = %153
  %156 = icmp eq i32 %154, 0
  br i1 %156, label %157, label %181

157:                                              ; preds = %155
  %158 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32) %3, i8 noundef signext 58, i64 noundef 0) #8
  %.not95 = icmp eq i64 %158, -1
  br i1 %.not95, label %178, label %159

159:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  %160 = add nuw i64 %158, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %160, i64 noundef -1)
          to label %161 unwind label %171

161:                                              ; preds = %159
  %162 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef null, i32 noundef 10)
          to label %163 unwind label %173

163:                                              ; preds = %161
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  %164 = icmp slt i32 %162, 1
  br i1 %164, label %165, label %178

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.15)
          to label %167 unwind label %176

167:                                              ; preds = %165
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %169 unwind label %176

169:                                              ; preds = %167
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef nonnull @.str.12)
          to label %.thread138 unwind label %176

171:                                              ; preds = %159
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %175

173:                                              ; preds = %161
  %174 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %175

175:                                              ; preds = %173, %171
  %.pn = phi { ptr, i32 } [ %174, %173 ], [ %172, %171 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br label %188

176:                                              ; preds = %169, %167, %165
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %188

178:                                              ; preds = %163, %157
  %.1.ph = phi i32 [ 1, %157 ], [ %162, %163 ]
  invoke void @_Z24encode_performance_testsi(i32 noundef %.1.ph)
          to label %190 unwind label %179

179:                                              ; preds = %178
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %188

181:                                              ; preds = %155
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.17)
          to label %183 unwind label %.loopexit.split-lp

183:                                              ; preds = %181
  %184 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef %185)
          to label %.invoke unwind label %.loopexit.split-lp

.thread138:                                       ; preds = %.invoke, %20, %38, %51, %64, %79, %108, %141, %169
  %187 = phi i32 [ 0, %169 ], [ 0, %141 ], [ 0, %108 ], [ %80, %79 ], [ %65, %64 ], [ %52, %51 ], [ %39, %38 ], [ %21, %20 ], [ 1, %.invoke ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %.loopexit

188:                                              ; preds = %.loopexit142, %.loopexit.split-lp, %179, %176, %175, %151, %148, %147, %118, %115, %114, %88
  %.pn118 = phi { ptr, i32 } [ %.pn115.pn, %88 ], [ %119, %118 ], [ %116, %115 ], [ %.pn109, %114 ], [ %152, %151 ], [ %149, %148 ], [ %.pn102, %147 ], [ %180, %179 ], [ %177, %176 ], [ %.pn, %175 ], [ %lpad.loopexit, %.loopexit142 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %189

189:                                              ; preds = %188, %22
  %.pn118.pn = phi { ptr, i32 } [ %.pn118, %188 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn118.pn

190:                                              ; preds = %91, %117, %124, %150, %178
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not = icmp eq i64 %indvars.iv.next, %11
  br i1 %.not, label %.loopexit, label %.preheader, !llvm.loop !9

.loopexit:                                        ; preds = %190, %.thread138, %12
  %.384 = phi i32 [ 1, %12 ], [ %187, %.thread138 ], [ 0, %190 ]
  ret i32 %.384
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #4 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 #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_119result_to_exit_codeEb(i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_19unit_testEv() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_110decode_rawEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_113decode_to_pnmEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_110encode_pnmEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_111compare_pnmERSiS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

declare void @_Z24damaged_bit_stream_testsv() local_unnamed_addr #6

declare noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext, i64 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) local_unnamed_addr #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 #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare void @_Z17performance_testsi(i32 noundef) local_unnamed_addr #6

declare void @_Z33test_large_image_performance_rgb8i(i32 noundef) local_unnamed_addr #6

declare void @_Z24decode_performance_testsi(i32 noundef) local_unnamed_addr #6

declare void @_Z24encode_performance_testsi(i32 noundef) local_unnamed_addr #6

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


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