; LLVM IR from SSBMTonberry/pocketlzma :: ref_spec/lzma1900/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.ll (Z5main2iPPKc)

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

%struct.CInputStream = type { ptr, i64 }
%class.CLzmaDecoder = type <{ %class.CRangeDecoder, %class.COutWindow, i8, [3 x i8], i32, i32, i32, i32, i32, ptr, [4 x %class.CBitTreeDecoder], %class.CBitTreeDecoder.0, [115 x i16], [192 x i16], [12 x i16], [12 x i16], [12 x i16], [12 x i16], [192 x i16], %class.CLenDecoder, %class.CLenDecoder, [2 x i8] }>
%class.CRangeDecoder = type <{ i32, i32, ptr, i8, [7 x i8] }>
%class.COutWindow = type { ptr, i32, i32, i8, i32, %struct.COutStream }
%struct.COutStream = type { ptr, i64 }
%class.CBitTreeDecoder = type { [64 x i16] }
%class.CBitTreeDecoder.0 = type { [16 x i16] }
%class.CLenDecoder = type { i16, i16, [16 x %class.CBitTreeDecoder.1], [16 x %class.CBitTreeDecoder.1], %class.CBitTreeDecoder.2 }
%class.CBitTreeDecoder.1 = type { [8 x i16] }
%class.CBitTreeDecoder.2 = type { [256 x i16] }

@.str.2 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZTIPKc = external constant ptr
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 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 [24 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12CLzmaDecoder6DecodeEby(ptr noundef nonnull align 8 dereferenceable(3790), i1 noundef zeroext, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11PrintUInt64PKcy(ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL5PrintPKc(ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5main2iPPKc(i32 noundef %0, ptr noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %struct.CInputStream, align 8
  %6 = alloca %class.CLzmaDecoder, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca [13 x i8], align 1
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @_ZL5PrintPKc(ptr noundef @.str.2)
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %18

17:                                               ; preds = %2
  call void @_ZL5PrintPKc(ptr noundef @.str.3)
  br label %18

18:                                               ; preds = %17, %2
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 3
  br i1 %20, label %21, label %23

21:                                               ; preds = %18
  %22 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.4, ptr %22, align 16, !tbaa !9
  call void @__cxa_throw(ptr %22, ptr @_ZTIPKc, ptr null) #5
  unreachable

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  %24 = load ptr, ptr %4, align 8, !tbaa !9
  %25 = getelementptr inbounds ptr, ptr %24, i64 1
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call noalias ptr @fopen(ptr noundef %26, ptr noundef @.str.5)
  %28 = getelementptr inbounds %struct.CInputStream, ptr %5, i32 0, i32 0
  store ptr %27, ptr %28, align 8, !tbaa !11
  call void @_ZN12CInputStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %29 = getelementptr inbounds %struct.CInputStream, ptr %5, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %34

32:                                               ; preds = %23
  %33 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.6, ptr %33, align 16, !tbaa !9
  call void @__cxa_throw(ptr %33, ptr @_ZTIPKc, ptr null) #5
  unreachable

34:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 3792, ptr %6) #4
  call void @_ZN12CLzmaDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(3790) %6)
  %35 = load ptr, ptr %4, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 2
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = invoke noalias ptr @fopen(ptr noundef %37, ptr noundef @.str.7)
          to label %39 unwind label %51

39:                                               ; preds = %34
  %40 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 1
  %41 = getelementptr inbounds %class.COutWindow, ptr %40, i32 0, i32 5
  %42 = getelementptr inbounds %struct.COutStream, ptr %41, i32 0, i32 0
  store ptr %38, ptr %42, align 8, !tbaa !14
  %43 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 1
  %44 = getelementptr inbounds %class.COutWindow, ptr %43, i32 0, i32 5
  invoke void @_ZN10COutStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16) %44)
          to label %45 unwind label %51

45:                                               ; preds = %39
  %46 = getelementptr inbounds %struct.CInputStream, ptr %5, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %55

49:                                               ; preds = %45
  %50 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.8, ptr %50, align 16, !tbaa !9
  invoke void @__cxa_throw(ptr %50, ptr @_ZTIPKc, ptr null) #5
          to label %205 unwind label %51

51:                                               ; preds = %49, %39, %34
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  br label %199

55:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 13, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %65, %55
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = icmp slt i32 %57, 13
  br i1 %58, label %59, label %72

59:                                               ; preds = %56
  %60 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %61 unwind label %68

61:                                               ; preds = %59
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [13 x i8], ptr %9, i64 0, i64 %63
  store i8 %60, ptr %64, align 1, !tbaa !24
  br label %65

65:                                               ; preds = %61
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %10, align 4, !tbaa !5
  br label %56, !llvm.loop !25

68:                                               ; preds = %86, %82, %74, %72, %59
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %7, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %8, align 4
  br label %198

72:                                               ; preds = %56
  %73 = getelementptr inbounds [13 x i8], ptr %9, i64 0, i64 0
  invoke void @_ZN12CLzmaDecoder16DecodePropertiesEPKh(ptr noundef nonnull align 8 dereferenceable(3790) %6, ptr noundef %73)
          to label %74 unwind label %68

74:                                               ; preds = %72
  %75 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 4
  %76 = load i32, ptr %75, align 4, !tbaa !27
  %77 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 6
  %78 = load i32, ptr %77, align 4, !tbaa !28
  %79 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 5
  %80 = load i32, ptr %79, align 8, !tbaa !29
  %81 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %76, i32 noundef %78, i32 noundef %80)
          to label %82 unwind label %68

82:                                               ; preds = %74
  %83 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 8
  %84 = load i32, ptr %83, align 4, !tbaa !30
  %85 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %84)
          to label %86 unwind label %68

86:                                               ; preds = %82
  %87 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 7
  %88 = load i32, ptr %87, align 8, !tbaa !31
  %89 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %88)
          to label %90 unwind label %68

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  store i8 0, ptr %12, align 1, !tbaa !33
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %113, %90
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = icmp slt i32 %92, 8
  br i1 %93, label %94, label %116

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = add nsw i32 5, %95
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [13 x i8], ptr %9, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !24
  store i8 %99, ptr %13, align 1, !tbaa !24
  %100 = load i8, ptr %13, align 1, !tbaa !24
  %101 = zext i8 %100 to i32
  %102 = icmp ne i32 %101, 255
  br i1 %102, label %103, label %104

103:                                              ; preds = %94
  store i8 1, ptr %12, align 1, !tbaa !33
  br label %104

104:                                              ; preds = %103, %94
  %105 = load i8, ptr %13, align 1, !tbaa !24
  %106 = zext i8 %105 to i64
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = mul nsw i32 8, %107
  %109 = zext i32 %108 to i64
  %110 = shl i64 %106, %109
  %111 = load i64, ptr %11, align 8, !tbaa !32
  %112 = or i64 %111, %110
  store i64 %112, ptr %11, align 8, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %113

113:                                              ; preds = %104
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %10, align 4, !tbaa !5
  br label %91, !llvm.loop !34

116:                                              ; preds = %91
  %117 = load i8, ptr %12, align 1, !tbaa !33, !range !35, !noundef !36
  %118 = trunc i8 %117 to i1
  %119 = xor i1 %118, true
  %120 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 2
  %121 = zext i1 %119 to i8
  store i8 %121, ptr %120, align 8, !tbaa !37
  invoke void @_ZL5PrintPKc(ptr noundef @.str.12)
          to label %122 unwind label %128

122:                                              ; preds = %116
  %123 = load i8, ptr %12, align 1, !tbaa !33, !range !35, !noundef !36
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %132

125:                                              ; preds = %122
  %126 = load i64, ptr %11, align 8, !tbaa !32
  invoke void @_Z11PrintUInt64PKcy(ptr noundef @.str.13, i64 noundef %126)
          to label %127 unwind label %128

127:                                              ; preds = %125
  br label %134

128:                                              ; preds = %137, %134, %132, %125, %116
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %7, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %8, align 4
  br label %197

132:                                              ; preds = %122
  invoke void @_ZL5PrintPKc(ptr noundef @.str.14)
          to label %133 unwind label %128

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %127
  %135 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 0
  %136 = getelementptr inbounds %class.CRangeDecoder, ptr %135, i32 0, i32 2
  store ptr %5, ptr %136, align 8, !tbaa !38
  invoke void @_ZL5PrintPKc(ptr noundef @.str.12)
          to label %137 unwind label %128

137:                                              ; preds = %134
  invoke void @_ZN12CLzmaDecoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(3790) %6)
          to label %138 unwind label %128

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %139 = load i8, ptr %12, align 1, !tbaa !33, !range !35, !noundef !36
  %140 = trunc i8 %139 to i1
  %141 = load i64, ptr %11, align 8, !tbaa !32
  %142 = invoke noundef i32 @_ZN12CLzmaDecoder6DecodeEby(ptr noundef nonnull align 8 dereferenceable(3790) %6, i1 noundef zeroext %140, i64 noundef %141)
          to label %143 unwind label %156

143:                                              ; preds = %138
  store i32 %142, ptr %14, align 4, !tbaa !5
  %144 = getelementptr inbounds %struct.CInputStream, ptr %5, i32 0, i32 1
  %145 = load i64, ptr %144, align 8, !tbaa !39
  invoke void @_Z11PrintUInt64PKcy(ptr noundef @.str.15, i64 noundef %145)
          to label %146 unwind label %156

146:                                              ; preds = %143
  %147 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 1
  %148 = getelementptr inbounds %class.COutWindow, ptr %147, i32 0, i32 5
  %149 = getelementptr inbounds %struct.COutStream, ptr %148, i32 0, i32 1
  %150 = load i64, ptr %149, align 8, !tbaa !40
  invoke void @_Z11PrintUInt64PKcy(ptr noundef @.str.16, i64 noundef %150)
          to label %151 unwind label %156

151:                                              ; preds = %146
  %152 = load i32, ptr %14, align 4, !tbaa !5
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %160

154:                                              ; preds = %151
  %155 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.17, ptr %155, align 16, !tbaa !9
  invoke void @__cxa_throw(ptr %155, ptr @_ZTIPKc, ptr null) #5
          to label %205 unwind label %156

156:                                              ; preds = %194, %188, %184, %182, %180, %178, %163, %154, %146, %143, %138
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %7, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %197

160:                                              ; preds = %151
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = icmp eq i32 %161, 2
  br i1 %162, label %163, label %165

163:                                              ; preds = %160
  invoke void @_ZL5PrintPKc(ptr noundef @.str.18)
          to label %164 unwind label %156

164:                                              ; preds = %163
  br label %187

165:                                              ; preds = %160
  %166 = load i32, ptr %14, align 4, !tbaa !5
  %167 = icmp eq i32 %166, 1
  br i1 %167, label %168, label %184

168:                                              ; preds = %165
  %169 = load i8, ptr %12, align 1, !tbaa !33, !range !35, !noundef !36
  %170 = trunc i8 %169 to i1
  br i1 %170, label %171, label %182

171:                                              ; preds = %168
  %172 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 1
  %173 = getelementptr inbounds %class.COutWindow, ptr %172, i32 0, i32 5
  %174 = getelementptr inbounds %struct.COutStream, ptr %173, i32 0, i32 1
  %175 = load i64, ptr %174, align 8, !tbaa !40
  %176 = load i64, ptr %11, align 8, !tbaa !32
  %177 = icmp ne i64 %175, %176
  br i1 %177, label %178, label %180

178:                                              ; preds = %171
  %179 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.19, ptr %179, align 16, !tbaa !9
  invoke void @__cxa_throw(ptr %179, ptr @_ZTIPKc, ptr null) #5
          to label %205 unwind label %156

180:                                              ; preds = %171
  invoke void @_ZL5PrintPKc(ptr noundef @.str.20)
          to label %181 unwind label %156

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181, %168
  invoke void @_ZL5PrintPKc(ptr noundef @.str.21)
          to label %183 unwind label %156

183:                                              ; preds = %182
  br label %186

184:                                              ; preds = %165
  %185 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.22, ptr %185, align 16, !tbaa !9
  invoke void @__cxa_throw(ptr %185, ptr @_ZTIPKc, ptr null) #5
          to label %205 unwind label %156

186:                                              ; preds = %183
  br label %187

187:                                              ; preds = %186, %164
  br label %188

188:                                              ; preds = %187
  invoke void @_ZL5PrintPKc(ptr noundef @.str.12)
          to label %189 unwind label %156

189:                                              ; preds = %188
  %190 = getelementptr inbounds %class.CLzmaDecoder, ptr %6, i32 0, i32 0
  %191 = getelementptr inbounds %class.CRangeDecoder, ptr %190, i32 0, i32 3
  %192 = load i8, ptr %191, align 8, !tbaa !41, !range !35, !noundef !36
  %193 = trunc i8 %192 to i1
  br i1 %193, label %194, label %196

194:                                              ; preds = %189
  invoke void @_ZL5PrintPKc(ptr noundef @.str.23)
          to label %195 unwind label %156

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 13, ptr %9) #4
  call void @_ZN12CLzmaDecoderD2Ev(ptr noundef nonnull align 8 dereferenceable(3790) %6) #4
  call void @llvm.lifetime.end.p0(i64 3792, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  ret i32 0

197:                                              ; preds = %156, %128
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %198

198:                                              ; preds = %197, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 13, ptr %9) #4
  br label %199

199:                                              ; preds = %198, %51
  call void @_ZN12CLzmaDecoderD2Ev(ptr noundef nonnull align 8 dereferenceable(3790) %6) #4
  call void @llvm.lifetime.end.p0(i64 3792, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  br label %200

200:                                              ; preds = %199
  %201 = load ptr, ptr %7, align 8
  %202 = load i32, ptr %8, align 4
  %203 = insertvalue { ptr, i32 } poison, ptr %201, 0
  %204 = insertvalue { ptr, i32 } %203, i32 %202, 1
  resume { ptr, i32 } %204

205:                                              ; preds = %184, %178, %154, %49
  unreachable
}

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CInputStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10COutStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12CLzmaDecoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(3790)) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 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 = { nounwind }
attributes #5 = { noreturn }

!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, !10, i64 0}
!12 = !{!"_ZTS12CInputStream", !10, i64 0, !13, i64 8}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !10, i64 48}
!15 = !{!"_ZTS12CLzmaDecoder", !16, i64 0, !18, i64 24, !17, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !10, i64 88, !7, i64 96, !20, i64 608, !7, i64 640, !7, i64 870, !7, i64 1254, !7, i64 1278, !7, i64 1302, !7, i64 1326, !7, i64 1350, !21, i64 1734, !21, i64 2762}
!16 = !{!"_ZTS13CRangeDecoder", !6, i64 0, !6, i64 4, !10, i64 8, !17, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS10COutWindow", !10, i64 0, !6, i64 8, !6, i64 12, !17, i64 16, !6, i64 20, !19, i64 24}
!19 = !{!"_ZTS10COutStream", !10, i64 0, !13, i64 8}
!20 = !{!"_ZTS15CBitTreeDecoderILj4EE", !7, i64 0}
!21 = !{!"_ZTS11CLenDecoder", !22, i64 0, !22, i64 2, !7, i64 4, !7, i64 260, !23, i64 516}
!22 = !{!"short", !7, i64 0}
!23 = !{!"_ZTS15CBitTreeDecoderILj8EE", !7, i64 0}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!15, !6, i64 68}
!28 = !{!15, !6, i64 76}
!29 = !{!15, !6, i64 72}
!30 = !{!15, !6, i64 84}
!31 = !{!15, !6, i64 80}
!32 = !{!13, !13, i64 0}
!33 = !{!17, !17, i64 0}
!34 = distinct !{!34, !26}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!15, !17, i64 64}
!38 = !{!15, !10, i64 8}
!39 = !{!12, !13, i64 8}
!40 = !{!15, !13, i64 56}
!41 = !{!15, !17, i64 16}


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

%struct.CInputStream = type { ptr, i64 }
%class.CLzmaDecoder = type <{ %class.CRangeDecoder, %class.COutWindow, i8, [3 x i8], i32, i32, i32, i32, i32, ptr, [4 x %class.CBitTreeDecoder], %class.CBitTreeDecoder.0, [115 x i16], [192 x i16], [12 x i16], [12 x i16], [12 x i16], [12 x i16], [192 x i16], %class.CLenDecoder, %class.CLenDecoder, [2 x i8] }>
%class.CRangeDecoder = type <{ i32, i32, ptr, i8, [7 x i8] }>
%class.COutWindow = type { ptr, i32, i32, i8, i32, %struct.COutStream }
%struct.COutStream = type { ptr, i64 }
%class.CBitTreeDecoder = type { [64 x i16] }
%class.CBitTreeDecoder.0 = type { [16 x i16] }
%class.CLenDecoder = type { i16, i16, [16 x %class.CBitTreeDecoder.1], [16 x %class.CBitTreeDecoder.1], %class.CBitTreeDecoder.2 }
%class.CBitTreeDecoder.1 = type { [8 x i16] }
%class.CBitTreeDecoder.2 = type { [256 x i16] }

@.str.2 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZTIPKc = external constant ptr
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 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 [24 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12CLzmaDecoder6DecodeEby(ptr noundef nonnull align 8 dereferenceable(3790), i1 noundef zeroext, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11PrintUInt64PKcy(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL5PrintPKc(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5main2iPPKc(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.CInputStream, align 8
  %4 = alloca %class.CLzmaDecoder, align 8
  %5 = alloca [13 x i8], align 1
  tail call void @_ZL5PrintPKc(ptr noundef nonnull @.str.2)
  switch i32 %0, label %7 [
    i32 1, label %6
    i32 3, label %9
  ]

6:                                                ; preds = %2
  tail call void @_ZL5PrintPKc(ptr noundef nonnull @.str.3)
  br label %7

7:                                                ; preds = %6, %2
  %8 = tail call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.4, ptr %8, align 16, !tbaa !5
  tail call void @__cxa_throw(ptr nonnull %8, ptr nonnull @_ZTIPKc, ptr null) #5
  unreachable

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = tail call noalias ptr @fopen(ptr noundef %11, ptr noundef nonnull @.str.5)
  store ptr %12, ptr %3, align 8, !tbaa !9
  call void @_ZN12CInputStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %13 = load ptr, ptr %3, align 8, !tbaa !9
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %9
  %16 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.6, ptr %16, align 16, !tbaa !5
  call void @__cxa_throw(ptr nonnull %16, ptr nonnull @_ZTIPKc, ptr null) #5
  unreachable

17:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 3792, ptr nonnull %4) #4
  call void @_ZN12CLzmaDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(3790) %4)
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = call noalias ptr @fopen(ptr noundef %19, ptr noundef nonnull @.str.7)
  %21 = getelementptr inbounds i8, ptr %4, i64 48
  store ptr %20, ptr %21, align 8, !tbaa !12
  call void @_ZN10COutStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %22 = load ptr, ptr %3, align 8, !tbaa !9
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %28

24:                                               ; preds = %17
  %25 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.8, ptr %25, align 16, !tbaa !5
  invoke void @__cxa_throw(ptr nonnull %25, ptr nonnull @_ZTIPKc, ptr null) #5
          to label %151 unwind label %26

26:                                               ; preds = %24
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %150

28:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 13, ptr nonnull %5) #4
  %29 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %30 unwind label %.loopexit

30:                                               ; preds = %28
  store i8 %29, ptr %5, align 1, !tbaa !23
  %31 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %32 unwind label %.loopexit

32:                                               ; preds = %30
  %33 = getelementptr inbounds i8, ptr %5, i64 1
  store i8 %31, ptr %33, align 1, !tbaa !23
  %34 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %35 unwind label %.loopexit

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %5, i64 2
  store i8 %34, ptr %36, align 1, !tbaa !23
  %37 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %38 unwind label %.loopexit

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %5, i64 3
  store i8 %37, ptr %39, align 1, !tbaa !23
  %40 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %41 unwind label %.loopexit

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %5, i64 4
  store i8 %40, ptr %42, align 1, !tbaa !23
  %43 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %41
  %45 = getelementptr inbounds i8, ptr %5, i64 5
  store i8 %43, ptr %45, align 1, !tbaa !23
  %46 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %47 unwind label %.loopexit

47:                                               ; preds = %44
  %48 = getelementptr inbounds i8, ptr %5, i64 6
  store i8 %46, ptr %48, align 1, !tbaa !23
  %49 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %50 unwind label %.loopexit

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %5, i64 7
  store i8 %49, ptr %51, align 1, !tbaa !23
  %52 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %53 unwind label %.loopexit

53:                                               ; preds = %50
  %54 = getelementptr inbounds i8, ptr %5, i64 8
  store i8 %52, ptr %54, align 1, !tbaa !23
  %55 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %56 unwind label %.loopexit

56:                                               ; preds = %53
  %57 = getelementptr inbounds i8, ptr %5, i64 9
  store i8 %55, ptr %57, align 1, !tbaa !23
  %58 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %59 unwind label %.loopexit

59:                                               ; preds = %56
  %60 = getelementptr inbounds i8, ptr %5, i64 10
  store i8 %58, ptr %60, align 1, !tbaa !23
  %61 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %62 unwind label %.loopexit

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %5, i64 11
  store i8 %61, ptr %63, align 1, !tbaa !23
  %64 = invoke noundef zeroext i8 @_ZN12CInputStream8ReadByteEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %65 unwind label %.loopexit

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %5, i64 12
  store i8 %64, ptr %66, align 1, !tbaa !23
  invoke void @_ZN12CLzmaDecoder16DecodePropertiesEPKh(ptr noundef nonnull align 8 dereferenceable(3790) %4, ptr noundef nonnull %5)
          to label %67 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %62, %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %30, %28
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %149

.loopexit.split-lp:                               ; preds = %65
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %149

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %4, i64 68
  %69 = load i32, ptr %68, align 4, !tbaa !24
  %70 = getelementptr inbounds i8, ptr %4, i64 76
  %71 = load i32, ptr %70, align 4, !tbaa !25
  %72 = getelementptr inbounds i8, ptr %4, i64 72
  %73 = load i32, ptr %72, align 8, !tbaa !26
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %69, i32 noundef %71, i32 noundef %73)
  %75 = getelementptr inbounds i8, ptr %4, i64 84
  %76 = load i32, ptr %75, align 4, !tbaa !27
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %76)
  %78 = getelementptr inbounds i8, ptr %4, i64 80
  %79 = load i32, ptr %78, align 8, !tbaa !28
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %79)
  %81 = load <8 x i8>, ptr %45, align 1, !tbaa !23
  %.fr = freeze <8 x i8> %81
  %82 = extractelement <8 x i8> %.fr, i64 0
  %83 = zext i8 %82 to i64
  %84 = extractelement <8 x i8> %.fr, i64 1
  %85 = zext i8 %84 to i64
  %86 = shl nuw nsw i64 %85, 8
  %87 = or disjoint i64 %86, %83
  %88 = extractelement <8 x i8> %.fr, i64 2
  %89 = zext i8 %88 to i64
  %90 = shl nuw nsw i64 %89, 16
  %91 = or disjoint i64 %90, %87
  %92 = extractelement <8 x i8> %.fr, i64 3
  %93 = zext i8 %92 to i64
  %94 = shl nuw nsw i64 %93, 24
  %95 = or disjoint i64 %94, %91
  %96 = extractelement <8 x i8> %.fr, i64 4
  %97 = zext i8 %96 to i64
  %98 = shl nuw nsw i64 %97, 32
  %99 = or disjoint i64 %98, %95
  %100 = extractelement <8 x i8> %.fr, i64 5
  %101 = zext i8 %100 to i64
  %102 = shl nuw nsw i64 %101, 40
  %103 = or i64 %102, %99
  %104 = extractelement <8 x i8> %.fr, i64 6
  %105 = zext i8 %104 to i64
  %106 = shl nuw nsw i64 %105, 48
  %107 = or i64 %106, %103
  %.fr.scalar = bitcast <8 x i8> %.fr to i64
  %108 = icmp ne i64 %.fr.scalar, -1
  %109 = extractelement <8 x i8> %.fr, i64 7
  %110 = zext i8 %109 to i64
  %111 = shl nuw i64 %110, 56
  %112 = or i64 %111, %107
  %113 = getelementptr inbounds i8, ptr %4, i64 64
  %114 = xor i1 %108, true
  %115 = zext i1 %114 to i8
  store i8 %115, ptr %113, align 8, !tbaa !29
  invoke void @_ZL5PrintPKc(ptr noundef nonnull @.str.12)
          to label %116 unwind label %118

116:                                              ; preds = %67
  br i1 %108, label %117, label %120

117:                                              ; preds = %116
  invoke void @_Z11PrintUInt64PKcy(ptr noundef nonnull @.str.13, i64 noundef %112)
          to label %121 unwind label %118

118:                                              ; preds = %123, %121, %120, %117, %67
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %149

120:                                              ; preds = %116
  invoke void @_ZL5PrintPKc(ptr noundef nonnull @.str.14)
          to label %121 unwind label %118

121:                                              ; preds = %120, %117
  %122 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %3, ptr %122, align 8, !tbaa !30
  invoke void @_ZL5PrintPKc(ptr noundef nonnull @.str.12)
          to label %123 unwind label %118

123:                                              ; preds = %121
  invoke void @_ZN12CLzmaDecoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(3790) %4)
          to label %124 unwind label %118

124:                                              ; preds = %123
  %125 = invoke noundef i32 @_ZN12CLzmaDecoder6DecodeEby(ptr noundef nonnull align 8 dereferenceable(3790) %4, i1 noundef zeroext %108, i64 noundef %112)
          to label %126 unwind label %133

126:                                              ; preds = %124
  %127 = getelementptr inbounds i8, ptr %3, i64 8
  %128 = load i64, ptr %127, align 8, !tbaa !31
  invoke void @_Z11PrintUInt64PKcy(ptr noundef nonnull @.str.15, i64 noundef %128)
          to label %129 unwind label %133

129:                                              ; preds = %126
  %130 = getelementptr inbounds i8, ptr %4, i64 56
  %131 = load i64, ptr %130, align 8, !tbaa !32
  invoke void @_Z11PrintUInt64PKcy(ptr noundef nonnull @.str.16, i64 noundef %131)
          to label %132 unwind label %133

132:                                              ; preds = %129
  switch i32 %125, label %140 [
    i32 0, label %.invoke
    i32 2, label %.invoke49
    i32 1, label %135
  ]

133:                                              ; preds = %.invoke49, %.invoke, %147, %142, %138, %129, %126, %124
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %149

135:                                              ; preds = %132
  br i1 %108, label %136, label %.invoke49

136:                                              ; preds = %135
  %137 = load i64, ptr %130, align 8, !tbaa !32
  %.not34 = icmp eq i64 %137, %112
  br i1 %.not34, label %138, label %.invoke

138:                                              ; preds = %136
  invoke void @_ZL5PrintPKc(ptr noundef nonnull @.str.20)
          to label %.invoke49 unwind label %133

.invoke49:                                        ; preds = %135, %138, %132
  %139 = phi ptr [ @.str.18, %132 ], [ @.str.21, %138 ], [ @.str.21, %135 ]
  invoke void @_ZL5PrintPKc(ptr noundef nonnull %139)
          to label %142 unwind label %133

140:                                              ; preds = %132
  br label %.invoke

.invoke:                                          ; preds = %136, %132, %140
  %.str.17.sink = phi ptr [ @.str.22, %140 ], [ @.str.17, %132 ], [ @.str.19, %136 ]
  %141 = call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr %.str.17.sink, ptr %141, align 16, !tbaa !5
  invoke void @__cxa_throw(ptr nonnull %141, ptr nonnull @_ZTIPKc, ptr null) #5
          to label %.cont unwind label %133

.cont:                                            ; preds = %.invoke
  unreachable

142:                                              ; preds = %.invoke49
  invoke void @_ZL5PrintPKc(ptr noundef nonnull @.str.12)
          to label %143 unwind label %133

143:                                              ; preds = %142
  %144 = getelementptr inbounds i8, ptr %4, i64 16
  %145 = load i8, ptr %144, align 8, !tbaa !33, !range !34, !noundef !35
  %146 = trunc nuw i8 %145 to i1
  br i1 %146, label %147, label %148

147:                                              ; preds = %143
  invoke void @_ZL5PrintPKc(ptr noundef nonnull @.str.23)
          to label %148 unwind label %133

148:                                              ; preds = %147, %143
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %5) #4
  call void @_ZN12CLzmaDecoderD2Ev(ptr noundef nonnull align 8 dereferenceable(3790) %4) #4
  call void @llvm.lifetime.end.p0(i64 3792, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  ret i32 0

149:                                              ; preds = %.loopexit, %.loopexit.split-lp, %118, %133
  %.pn37 = phi { ptr, i32 } [ %134, %133 ], [ %119, %118 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %5) #4
  br label %150

150:                                              ; preds = %149, %26
  %.pn39 = phi { ptr, i32 } [ %27, %26 ], [ %.pn37, %149 ]
  call void @_ZN12CLzmaDecoderD2Ev(ptr noundef nonnull align 8 dereferenceable(3790) %4) #4
  call void @llvm.lifetime.end.p0(i64 3792, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn39

151:                                              ; preds = %24
  unreachable
}

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CInputStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10COutStream4InitEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12CLzmaDecoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(3790)) local_unnamed_addr #1 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS12CInputStream", !6, i64 0, !11, i64 8}
!11 = !{!"long long", !7, i64 0}
!12 = !{!13, !6, i64 48}
!13 = !{!"_ZTS12CLzmaDecoder", !14, i64 0, !17, i64 24, !16, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84, !6, i64 88, !7, i64 96, !19, i64 608, !7, i64 640, !7, i64 870, !7, i64 1254, !7, i64 1278, !7, i64 1302, !7, i64 1326, !7, i64 1350, !20, i64 1734, !20, i64 2762}
!14 = !{!"_ZTS13CRangeDecoder", !15, i64 0, !15, i64 4, !6, i64 8, !16, i64 16}
!15 = !{!"int", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTS10COutWindow", !6, i64 0, !15, i64 8, !15, i64 12, !16, i64 16, !15, i64 20, !18, i64 24}
!18 = !{!"_ZTS10COutStream", !6, i64 0, !11, i64 8}
!19 = !{!"_ZTS15CBitTreeDecoderILj4EE", !7, i64 0}
!20 = !{!"_ZTS11CLenDecoder", !21, i64 0, !21, i64 2, !7, i64 4, !7, i64 260, !22, i64 516}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTS15CBitTreeDecoderILj8EE", !7, i64 0}
!23 = !{!7, !7, i64 0}
!24 = !{!13, !15, i64 68}
!25 = !{!13, !15, i64 76}
!26 = !{!13, !15, i64 72}
!27 = !{!13, !15, i64 84}
!28 = !{!13, !15, i64 80}
!29 = !{!13, !16, i64 64}
!30 = !{!13, !6, i64 8}
!31 = !{!10, !11, i64 8}
!32 = !{!13, !11, i64 56}
!33 = !{!13, !16, i64 16}
!34 = !{i8 0, i8 2}
!35 = !{}


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