; LLVM IR from venumb/ZSPACE :: cpp/depends/lodePNG/examples (example_4bit_palette)

; 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.lodepng::State" = type { %struct.LodePNGState.base, [4 x i8] }
%struct.LodePNGState.base = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%struct.LodePNGDecompressSettings = type { i32, i32, ptr, ptr, ptr }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, 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.0" = type { i8 }
%struct.LodePNGState = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32, [4 x i8] }>

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 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 %"class.lodepng::State", align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::vector", align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator.0", align 1
  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
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp slt i32 %28, 2
  br i1 %29, label %30, label %33

30:                                               ; preds = %2
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %3, align 4
  br label %213

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 512, ptr %6) #8
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %90, %33
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 16
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %97

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = mul nsw i32 5, %39
  %41 = sitofp i32 %40 to double
  %42 = fmul double %41, 0x401921FB5474A168
  %43 = fdiv double %42, 1.600000e+01
  %44 = call double @sin(double noundef %43) #8
  %45 = fadd double 1.000000e+00, %44
  %46 = fmul double 1.270000e+02, %45
  %47 = fptoui double %46 to i8
  store i8 %47, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = mul nsw i32 2, %48
  %50 = sitofp i32 %49 to double
  %51 = fmul double %50, 0x401921FB5474A168
  %52 = fdiv double %51, 1.600000e+01
  %53 = call double @sin(double noundef %52) #8
  %54 = fadd double 1.000000e+00, %53
  %55 = fmul double 1.270000e+02, %54
  %56 = fptoui double %55 to i8
  store i8 %56, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = mul nsw i32 3, %57
  %59 = sitofp i32 %58 to double
  %60 = fmul double %59, 0x401921FB5474A168
  %61 = fdiv double %60, 1.600000e+01
  %62 = call double @sin(double noundef %61) #8
  %63 = fadd double 1.000000e+00, %62
  %64 = fmul double 1.270000e+02, %63
  %65 = fptoui double %64 to i8
  store i8 %65, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = mul nsw i32 8, %66
  %68 = sitofp i32 %67 to double
  %69 = fmul double %68, 0x401921FB5474A168
  %70 = fdiv double %69, 1.600000e+01
  %71 = call double @sin(double noundef %70) #8
  %72 = fadd double 1.000000e+00, %71
  %73 = call double @llvm.fmuladd.f64(double 6.300000e+01, double %72, double 1.280000e+02)
  %74 = fptoui double %73 to i8
  store i8 %74, ptr %11, align 1, !tbaa !11
  %75 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 4
  %76 = getelementptr inbounds %struct.LodePNGInfo, ptr %75, i32 0, i32 3
  %77 = load i8, ptr %8, align 1, !tbaa !11
  %78 = load i8, ptr %9, align 1, !tbaa !11
  %79 = load i8, ptr %10, align 1, !tbaa !11
  %80 = load i8, ptr %11, align 1, !tbaa !11
  %81 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef %76, i8 noundef zeroext %77, i8 noundef zeroext %78, i8 noundef zeroext %79, i8 noundef zeroext %80)
          to label %82 unwind label %93

82:                                               ; preds = %38
  %83 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 3
  %84 = load i8, ptr %8, align 1, !tbaa !11
  %85 = load i8, ptr %9, align 1, !tbaa !11
  %86 = load i8, ptr %10, align 1, !tbaa !11
  %87 = load i8, ptr %11, align 1, !tbaa !11
  %88 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef %83, i8 noundef zeroext %84, i8 noundef zeroext %85, i8 noundef zeroext %86, i8 noundef zeroext %87)
          to label %89 unwind label %93

89:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %7, align 4, !tbaa !5
  br label %34, !llvm.loop !12

93:                                               ; preds = %82, %38
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %12, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %226

97:                                               ; preds = %37
  %98 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 4
  %99 = getelementptr inbounds %struct.LodePNGInfo, ptr %98, i32 0, i32 3
  %100 = getelementptr inbounds %struct.LodePNGColorMode, ptr %99, i32 0, i32 0
  store i32 3, ptr %100, align 8, !tbaa !14
  %101 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 4
  %102 = getelementptr inbounds %struct.LodePNGInfo, ptr %101, i32 0, i32 3
  %103 = getelementptr inbounds %struct.LodePNGColorMode, ptr %102, i32 0, i32 1
  store i32 4, ptr %103, align 4, !tbaa !26
  %104 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 3
  %105 = getelementptr inbounds %struct.LodePNGColorMode, ptr %104, i32 0, i32 0
  store i32 3, ptr %105, align 8, !tbaa !27
  %106 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 3
  %107 = getelementptr inbounds %struct.LodePNGColorMode, ptr %106, i32 0, i32 1
  store i32 4, ptr %107, align 4, !tbaa !28
  %108 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 2
  %109 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %108, i32 0, i32 1
  store i32 0, ptr %109, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 511, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 511, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #8
  store i8 0, ptr %17, align 1, !tbaa !11
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEmRKh(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 130561, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %110 unwind label %115

110:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %171, %110
  %112 = load i32, ptr %18, align 4, !tbaa !5
  %113 = icmp ult i32 %112, 511
  br i1 %113, label %119, label %114

114:                                              ; preds = %111
  store i32 5, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %174

115:                                              ; preds = %97
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %12, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  br label %225

119:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %167, %119
  %121 = load i32, ptr %20, align 4, !tbaa !5
  %122 = icmp ult i32 %121, 511
  br i1 %122, label %124, label %123

123:                                              ; preds = %120
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %170

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %125 = load i32, ptr %18, align 4, !tbaa !5
  %126 = mul i32 %125, 511
  %127 = load i32, ptr %20, align 4, !tbaa !5
  %128 = add i32 %126, %127
  %129 = udiv i32 %128, 2
  %130 = zext i32 %129 to i64
  store i64 %130, ptr %21, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #8
  %131 = load i32, ptr %18, align 4, !tbaa !5
  %132 = mul i32 %131, 511
  %133 = load i32, ptr %20, align 4, !tbaa !5
  %134 = add i32 %132, %133
  %135 = urem i32 %134, 2
  %136 = icmp eq i32 %135, 1
  %137 = zext i1 %136 to i8
  store i8 %137, ptr %22, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %138 = load i32, ptr %20, align 4, !tbaa !5
  %139 = uitofp i32 %138 to double
  %140 = fmul double 0x402921FB5474A168, %139
  %141 = fdiv double %140, 5.110000e+02
  %142 = call double @sin(double noundef %141) #8
  %143 = fadd double 1.000000e+00, %142
  %144 = load i32, ptr %18, align 4, !tbaa !5
  %145 = uitofp i32 %144 to double
  %146 = fmul double 0x402921FB5474A168, %145
  %147 = fdiv double %146, 5.110000e+02
  %148 = call double @sin(double noundef %147) #8
  %149 = fadd double 1.000000e+00, %148
  %150 = fadd double %143, %149
  %151 = fmul double 4.000000e+00, %150
  %152 = fptosi double %151 to i32
  store i32 %152, ptr %23, align 4, !tbaa !5
  %153 = load i32, ptr %23, align 4, !tbaa !5
  %154 = load i8, ptr %22, align 1, !tbaa !31, !range !33, !noundef !34
  %155 = trunc i8 %154 to i1
  %156 = zext i1 %155 to i64
  %157 = select i1 %155, i32 0, i32 4
  %158 = shl i32 %153, %157
  %159 = trunc i32 %158 to i8
  %160 = zext i8 %159 to i32
  %161 = load i64, ptr %21, align 8, !tbaa !30
  %162 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %161) #8
  %163 = load i8, ptr %162, align 1, !tbaa !11
  %164 = zext i8 %163 to i32
  %165 = or i32 %164, %160
  %166 = trunc i32 %165 to i8
  store i8 %166, ptr %162, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %167

167:                                              ; preds = %124
  %168 = load i32, ptr %20, align 4, !tbaa !5
  %169 = add i32 %168, 1
  store i32 %169, ptr %20, align 4, !tbaa !5
  br label %120, !llvm.loop !35

170:                                              ; preds = %123
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %18, align 4, !tbaa !5
  %173 = add i32 %172, 1
  store i32 %173, ptr %18, align 4, !tbaa !5
  br label %111, !llvm.loop !36

174:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %175 = call noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  br i1 %175, label %176, label %177

176:                                              ; preds = %174
  br label %179

177:                                              ; preds = %174
  %178 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 0) #8
  br label %179

179:                                              ; preds = %177, %176
  %180 = phi ptr [ null, %176 ], [ %178, %177 ]
  %181 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef %180, i32 noundef 511, i32 noundef 511, ptr noundef nonnull align 8 dereferenceable(508) %6)
          to label %182 unwind label %200

182:                                              ; preds = %179
  store i32 %181, ptr %25, align 4, !tbaa !5
  %183 = load i32, ptr %25, align 4, !tbaa !5
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %204

185:                                              ; preds = %182
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %187 unwind label %200

187:                                              ; preds = %185
  %188 = load i32, ptr %25, align 4, !tbaa !5
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %186, i32 noundef %188)
          to label %190 unwind label %200

190:                                              ; preds = %187
  %191 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %189, ptr noundef @.str.2)
          to label %192 unwind label %200

192:                                              ; preds = %190
  %193 = load i32, ptr %25, align 4, !tbaa !5
  %194 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %193)
          to label %195 unwind label %200

195:                                              ; preds = %192
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %191, ptr noundef %194)
          to label %197 unwind label %200

197:                                              ; preds = %195
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %199 unwind label %200

199:                                              ; preds = %197
  store i32 0, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %211

200:                                              ; preds = %197, %195, %192, %190, %187, %185, %179
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %12, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %13, align 4
  br label %224

204:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #8
  %205 = load ptr, ptr %5, align 8, !tbaa !9
  %206 = getelementptr inbounds ptr, ptr %205, i64 1
  %207 = load ptr, ptr %206, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef %207, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %208 unwind label %215

208:                                              ; preds = %204
  %209 = invoke noundef i32 @_ZN7lodepng9save_fileERKSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %210 unwind label %219

210:                                              ; preds = %208
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  store i32 0, ptr %19, align 4
  br label %211

211:                                              ; preds = %210, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %6) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %6) #8
  %212 = load i32, ptr %19, align 4
  switch i32 %212, label %232 [
    i32 0, label %213
    i32 1, label %213
  ]

213:                                              ; preds = %211, %211, %30
  %214 = load i32, ptr %3, align 4
  ret i32 %214

215:                                              ; preds = %204
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %12, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %13, align 4
  br label %223

219:                                              ; preds = %208
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %12, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  br label %223

223:                                              ; preds = %219, %215
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  br label %224

224:                                              ; preds = %223, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %225

225:                                              ; preds = %224, %115
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %226

226:                                              ; preds = %225, %93
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %6) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %6) #8
  br label %227

227:                                              ; preds = %226
  %228 = load ptr, ptr %12, align 8
  %229 = load i32, ptr %13, align 4
  %230 = insertvalue { ptr, i32 } poison, ptr %228, 0
  %231 = insertvalue { ptr, i32 } %230, i32 %229, 1
  resume { ptr, i32 } %231

232:                                              ; preds = %211
  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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

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

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

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508)) unnamed_addr #4

; Function Attrs: nounwind
declare double @sin(double noundef) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

declare noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #4

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEmRKh(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(508)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

declare noundef ptr @_Z18lodepng_error_textj(i32 noundef) #4

declare noundef i32 @_ZN7lodepng9save_fileERKSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7 align 2

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508)) unnamed_addr #5

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

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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !22, i64 208}
!15 = !{!"_ZTS12LodePNGState", !16, i64 8, !18, i64 64, !21, i64 152, !24, i64 192, !6, i64 504}
!16 = !{!"_ZTS22LodePNGDecoderSettings", !17, i64 0, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52}
!17 = !{!"_ZTS25LodePNGDecompressSettings", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24}
!18 = !{!"_ZTS22LodePNGEncoderSettings", !19, i64 0, !6, i64 48, !6, i64 52, !20, i64 56, !10, i64 64, !6, i64 72, !6, i64 76, !6, i64 80}
!19 = !{!"_ZTS23LodePNGCompressSettings", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !10, i64 24, !10, i64 32, !10, i64 40}
!20 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!21 = !{!"_ZTS16LodePNGColorMode", !22, i64 0, !6, i64 4, !10, i64 8, !23, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36}
!22 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTS11LodePNGInfo", !6, i64 0, !6, i64 4, !6, i64 8, !21, i64 16, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !23, i64 72, !10, i64 80, !10, i64 88, !23, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !6, i64 136, !25, i64 140, !6, i64 164, !6, i64 168, !6, i64 172, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188, !6, i64 192, !6, i64 196, !6, i64 200, !6, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !6, i64 220, !6, i64 224, !6, i64 228, !6, i64 232, !10, i64 240, !10, i64 248, !6, i64 256, !7, i64 264, !7, i64 288}
!25 = !{!"_ZTS11LodePNGTime", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!26 = !{!15, !6, i64 212}
!27 = !{!15, !22, i64 152}
!28 = !{!15, !6, i64 156}
!29 = !{!15, !6, i64 112}
!30 = !{!23, !23, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"bool", !7, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = distinct !{!35, !13}
!36 = distinct !{!36, !13}


; 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.lodepng::State" = type { %struct.LodePNGState.base, [4 x i8] }
%struct.LodePNGState.base = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%struct.LodePNGDecompressSettings = type { i32, i32, ptr, ptr, ptr }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, 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.0" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 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.lodepng::State", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.0", align 1
  %9 = icmp slt i32 %0, 2
  br i1 %9, label %10, label %13

10:                                               ; preds = %2
  %11 = 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)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %121

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #9
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508) %3)
  %14 = getelementptr inbounds i8, ptr %3, i64 208
  %15 = getelementptr inbounds i8, ptr %3, i64 152
  br label %20

16:                                               ; preds = %56
  store i32 3, ptr %14, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %3, i64 212
  store i32 4, ptr %17, align 4, !tbaa !21
  store i32 3, ptr %15, align 8, !tbaa !22
  %18 = getelementptr inbounds i8, ptr %3, i64 156
  store i32 4, ptr %18, align 4, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %3, i64 112
  store i32 0, ptr %19, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  store i8 0, ptr %5, align 1, !tbaa !25
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEmRKh(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 130561, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %60 unwind label %67

20:                                               ; preds = %13, %56
  %.03450 = phi i32 [ 0, %13 ], [ %57, %56 ]
  %21 = mul nuw nsw i32 %.03450, 5
  %22 = uitofp nneg i32 %21 to double
  %23 = fmul double %22, 0x401921FB5474A168
  %24 = fmul double %23, 6.250000e-02
  %25 = call double @sin(double noundef %24) #9
  %26 = fadd double %25, 1.000000e+00
  %27 = fmul double %26, 1.270000e+02
  %28 = fptoui double %27 to i8
  %29 = shl nuw nsw i32 %.03450, 1
  %30 = uitofp nneg i32 %29 to double
  %31 = fmul double %30, 0x401921FB5474A168
  %32 = fmul double %31, 6.250000e-02
  %33 = call double @sin(double noundef %32) #9
  %34 = fadd double %33, 1.000000e+00
  %35 = fmul double %34, 1.270000e+02
  %36 = fptoui double %35 to i8
  %37 = mul nuw nsw i32 %.03450, 3
  %38 = uitofp nneg i32 %37 to double
  %39 = fmul double %38, 0x401921FB5474A168
  %40 = fmul double %39, 6.250000e-02
  %41 = call double @sin(double noundef %40) #9
  %42 = fadd double %41, 1.000000e+00
  %43 = fmul double %42, 1.270000e+02
  %44 = fptoui double %43 to i8
  %45 = shl nuw nsw i32 %.03450, 3
  %46 = uitofp nneg i32 %45 to double
  %47 = fmul double %46, 0x401921FB5474A168
  %48 = fmul double %47, 6.250000e-02
  %49 = call double @sin(double noundef %48) #9
  %50 = fadd double %49, 1.000000e+00
  %51 = call double @llvm.fmuladd.f64(double %50, double 6.300000e+01, double 1.280000e+02)
  %52 = fptoui double %51 to i8
  %53 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef nonnull %14, i8 noundef zeroext %28, i8 noundef zeroext %36, i8 noundef zeroext %44, i8 noundef zeroext %52)
          to label %54 unwind label %58

54:                                               ; preds = %20
  %55 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef nonnull %15, i8 noundef zeroext %28, i8 noundef zeroext %36, i8 noundef zeroext %44, i8 noundef zeroext %52)
          to label %56 unwind label %58

56:                                               ; preds = %54
  %57 = add nuw nsw i32 %.03450, 1
  %exitcond.not = icmp eq i32 %57, 16
  br i1 %exitcond.not, label %16, label %20, !llvm.loop !26

58:                                               ; preds = %54, %20
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %129

60:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %.preheader

.preheader:                                       ; preds = %60, %69
  %.04252 = phi i32 [ 0, %60 ], [ %70, %69 ]
  %61 = mul nuw nsw i32 %.04252, 511
  %62 = uitofp nneg i32 %.04252 to double
  %63 = fmul double %62, 0x402921FB5474A168
  %64 = fdiv double %63, 5.110000e+02
  br label %71

65:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  %66 = call noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  br i1 %66, label %96, label %94

67:                                               ; preds = %16
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %128

69:                                               ; preds = %71
  %70 = add nuw nsw i32 %.04252, 1
  %exitcond54.not = icmp eq i32 %70, 511
  br i1 %exitcond54.not, label %65, label %.preheader, !llvm.loop !28

71:                                               ; preds = %.preheader, %71
  %.04151 = phi i32 [ 0, %.preheader ], [ %93, %71 ]
  %72 = add nuw nsw i32 %.04151, %61
  %73 = lshr i32 %72, 1
  %74 = zext nneg i32 %73 to i64
  %75 = uitofp nneg i32 %.04151 to double
  %76 = fmul double %75, 0x402921FB5474A168
  %77 = fdiv double %76, 5.110000e+02
  %78 = call double @sin(double noundef %77) #9
  %79 = fadd double %78, 1.000000e+00
  %80 = call double @sin(double noundef %64) #9
  %81 = fadd double %80, 1.000000e+00
  %82 = fadd double %79, %81
  %83 = fmul double %82, 4.000000e+00
  %84 = fptosi double %83 to i32
  %85 = shl nuw nsw i32 %72, 2
  %86 = and i32 %85, 4
  %87 = xor i32 %86, 4
  %88 = shl i32 %84, %87
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %74) #9
  %90 = load i8, ptr %89, align 1, !tbaa !25
  %91 = trunc i32 %88 to i8
  %92 = or i8 %90, %91
  store i8 %92, ptr %89, align 1, !tbaa !25
  %93 = add nuw nsw i32 %.04151, 1
  %exitcond53.not = icmp eq i32 %93, 511
  br i1 %exitcond53.not, label %69, label %71, !llvm.loop !29

94:                                               ; preds = %65
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #9
  br label %96

96:                                               ; preds = %65, %94
  %97 = phi ptr [ %95, %94 ], [ null, %65 ]
  %98 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef %97, i32 noundef 511, i32 noundef 511, ptr noundef nonnull align 8 dereferenceable(508) %3)
          to label %99 unwind label %112

99:                                               ; preds = %96
  %.not = icmp eq i32 %98, 0
  br i1 %.not, label %114, label %100

100:                                              ; preds = %99
  %101 = 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.1)
          to label %102 unwind label %112

102:                                              ; preds = %100
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %101, i32 noundef %98)
          to label %104 unwind label %112

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

106:                                              ; preds = %104
  %107 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %98)
          to label %108 unwind label %112

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef %107)
          to label %110 unwind label %112

110:                                              ; preds = %108
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %120 unwind label %112

112:                                              ; preds = %110, %108, %106, %104, %102, %100, %96
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %127

114:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  %115 = getelementptr inbounds i8, ptr %1, i64 8
  %116 = load ptr, ptr %115, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %116, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %117 unwind label %122

117:                                              ; preds = %114
  %118 = invoke noundef i32 @_ZN7lodepng9save_fileERKSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %119 unwind label %124

119:                                              ; preds = %117
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %120

120:                                              ; preds = %110, %119
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %3) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #9
  br label %121

121:                                              ; preds = %120, %10
  ret i32 0

122:                                              ; preds = %114
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %126

124:                                              ; preds = %117
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %126

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

127:                                              ; preds = %126, %112
  %.pn44 = phi { ptr, i32 } [ %113, %112 ], [ %.pn, %126 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  br label %128

128:                                              ; preds = %127, %67
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %127 ], [ %68, %67 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  br label %129

129:                                              ; preds = %128, %58
  %.pn48 = phi { ptr, i32 } [ %59, %58 ], [ %.pn44.pn, %128 ]
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %3) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn48
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

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

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

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508)) unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

declare noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEmRKh(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #7 align 2

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(508)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7 align 2

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

declare noundef ptr @_Z18lodepng_error_textj(i32 noundef) local_unnamed_addr #4

declare noundef i32 @_ZN7lodepng9save_fileERKSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7 align 2

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508)) unnamed_addr #8

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

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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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, !17, i64 208}
!6 = !{!"_ZTS12LodePNGState", !7, i64 8, !13, i64 64, !16, i64 152, !19, i64 192, !9, i64 504}
!7 = !{!"_ZTS22LodePNGDecoderSettings", !8, i64 0, !9, i64 32, !9, i64 36, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52}
!8 = !{!"_ZTS25LodePNGDecompressSettings", !9, i64 0, !9, i64 4, !12, i64 8, !12, i64 16, !12, i64 24}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"_ZTS22LodePNGEncoderSettings", !14, i64 0, !9, i64 48, !9, i64 52, !15, i64 56, !12, i64 64, !9, i64 72, !9, i64 76, !9, i64 80}
!14 = !{!"_ZTS23LodePNGCompressSettings", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !12, i64 24, !12, i64 32, !12, i64 40}
!15 = !{!"_ZTS21LodePNGFilterStrategy", !10, i64 0}
!16 = !{!"_ZTS16LodePNGColorMode", !17, i64 0, !9, i64 4, !12, i64 8, !18, i64 16, !9, i64 24, !9, i64 28, !9, i64 32, !9, i64 36}
!17 = !{!"_ZTS16LodePNGColorType", !10, i64 0}
!18 = !{!"long", !10, i64 0}
!19 = !{!"_ZTS11LodePNGInfo", !9, i64 0, !9, i64 4, !9, i64 8, !16, i64 16, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !18, i64 72, !12, i64 80, !12, i64 88, !18, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !9, i64 136, !20, i64 140, !9, i64 164, !9, i64 168, !9, i64 172, !9, i64 176, !9, i64 180, !9, i64 184, !9, i64 188, !9, i64 192, !9, i64 196, !9, i64 200, !9, i64 204, !9, i64 208, !9, i64 212, !9, i64 216, !9, i64 220, !9, i64 224, !9, i64 228, !9, i64 232, !12, i64 240, !12, i64 248, !9, i64 256, !10, i64 264, !10, i64 288}
!20 = !{!"_ZTS11LodePNGTime", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
!21 = !{!6, !9, i64 212}
!22 = !{!6, !17, i64 152}
!23 = !{!6, !9, i64 156}
!24 = !{!6, !9, i64 112}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = !{!12, !12, i64 0}


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