; LLVM IR from facebookresearch/StarSpace :: 3rdparty/gzip.ll (ZN5boost9iostreams6detail11gzip_header7processEc)

; 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.boost::iostreams::gzip_error" = type { %"class.std::ios_base::failure", i32, i32 }
%"class.std::ios_base::failure" = type { %"class.std::system_error" }
%"class.std::system_error" = type { %"class.std::runtime_error", %"class.std::error_code" }
%"class.std::runtime_error" = type { %"class.std::exception", %"struct.std::__cow_string" }
%"class.std::exception" = type { ptr }
%"struct.std::__cow_string" = type { %union.anon.0 }
%union.anon.0 = type { ptr }
%"class.std::error_code" = type { i32, ptr }
%"class.boost::iostreams::detail::gzip_header" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i64, i32, i32, i32, i32 }
%"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] }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN5boost9iostreams6detail11gzip_header7processEc = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9iostreams6detail11gzip_header7processEc(ptr noundef nonnull align 8 dereferenceable(96) %0, i8 noundef signext %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca %"class.boost::iostreams::gzip_error", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.boost::iostreams::gzip_error", align 8
  %10 = alloca %"class.boost::iostreams::gzip_error", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  %12 = load i8, ptr %4, align 1, !tbaa !9
  store i8 %12, ptr %5, align 1, !tbaa !9
  %13 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  %14 = load i32, ptr %13, align 4, !tbaa !10
  switch i32 %14, label %228 [
    i32 1, label %15
    i32 2, label %27
    i32 3, label %39
    i32 4, label %51
    i32 5, label %56
    i32 6, label %78
    i32 7, label %80
    i32 8, label %117
    i32 9, label %138
    i32 10, label %170
    i32 11, label %197
    i32 12, label %216
  ]

15:                                               ; preds = %2
  %16 = load i8, ptr %5, align 1, !tbaa !9
  %17 = zext i8 %16 to i32
  %18 = icmp ne i32 %17, 31
  br i1 %18, label %19, label %25

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #5
  call void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 4)
  invoke void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
          to label %20 unwind label %21

20:                                               ; preds = %19
  unreachable

21:                                               ; preds = %19
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %7, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %8, align 4
  call void @_ZNSt8ios_base7failureB5cxx11D2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #5
  br label %230

25:                                               ; preds = %15
  %26 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 2, ptr %26, align 4, !tbaa !10
  br label %229

27:                                               ; preds = %2
  %28 = load i8, ptr %5, align 1, !tbaa !9
  %29 = zext i8 %28 to i32
  %30 = icmp ne i32 %29, 139
  br i1 %30, label %31, label %37

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #5
  call void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef 4)
  invoke void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
          to label %32 unwind label %33

32:                                               ; preds = %31
  unreachable

33:                                               ; preds = %31
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  call void @_ZNSt8ios_base7failureB5cxx11D2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  br label %230

37:                                               ; preds = %27
  %38 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 3, ptr %38, align 4, !tbaa !10
  br label %229

39:                                               ; preds = %2
  %40 = load i8, ptr %5, align 1, !tbaa !9
  %41 = zext i8 %40 to i32
  %42 = icmp ne i32 %41, 8
  br i1 %42, label %43, label %49

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #5
  call void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40) %10, i32 noundef 6)
  invoke void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40) %10) #6
          to label %44 unwind label %45

44:                                               ; preds = %43
  unreachable

45:                                               ; preds = %43
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  call void @_ZNSt8ios_base7failureB5cxx11D2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #5
  br label %230

49:                                               ; preds = %39
  %50 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 4, ptr %50, align 4, !tbaa !10
  br label %229

51:                                               ; preds = %2
  %52 = load i8, ptr %5, align 1, !tbaa !9
  %53 = zext i8 %52 to i32
  %54 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  store i32 %53, ptr %54, align 8, !tbaa !16
  %55 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 5, ptr %55, align 4, !tbaa !10
  br label %229

56:                                               ; preds = %2
  %57 = load i8, ptr %5, align 1, !tbaa !9
  %58 = zext i8 %57 to i32
  %59 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %60 = load i32, ptr %59, align 8, !tbaa !17
  %61 = mul nsw i32 %60, 8
  %62 = shl i32 %58, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 3
  %65 = load i64, ptr %64, align 8, !tbaa !18
  %66 = add nsw i64 %65, %63
  store i64 %66, ptr %64, align 8, !tbaa !18
  %67 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %68 = load i32, ptr %67, align 8, !tbaa !17
  %69 = icmp eq i32 %68, 3
  br i1 %69, label %70, label %73

70:                                               ; preds = %56
  %71 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 6, ptr %71, align 4, !tbaa !10
  %72 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  store i32 0, ptr %72, align 8, !tbaa !17
  br label %77

73:                                               ; preds = %56
  %74 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %75 = load i32, ptr %74, align 8, !tbaa !17
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %74, align 8, !tbaa !17
  br label %77

77:                                               ; preds = %73, %70
  br label %229

78:                                               ; preds = %2
  %79 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 7, ptr %79, align 4, !tbaa !10
  br label %229

80:                                               ; preds = %2
  %81 = load i8, ptr %5, align 1, !tbaa !9
  %82 = zext i8 %81 to i32
  %83 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 2
  store i32 %82, ptr %83, align 8, !tbaa !19
  %84 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %85 = load i32, ptr %84, align 8, !tbaa !16
  %86 = and i32 %85, 4
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %80
  %89 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 9, ptr %89, align 4, !tbaa !10
  br label %116

90:                                               ; preds = %80
  %91 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %92 = load i32, ptr %91, align 8, !tbaa !16
  %93 = and i32 %92, 8
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %97

95:                                               ; preds = %90
  %96 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 10, ptr %96, align 4, !tbaa !10
  br label %115

97:                                               ; preds = %90
  %98 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %99 = load i32, ptr %98, align 8, !tbaa !16
  %100 = and i32 %99, 16
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %97
  %103 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 11, ptr %103, align 4, !tbaa !10
  br label %114

104:                                              ; preds = %97
  %105 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %106 = load i32, ptr %105, align 8, !tbaa !16
  %107 = and i32 %106, 2
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %104
  %110 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 12, ptr %110, align 4, !tbaa !10
  br label %113

111:                                              ; preds = %104
  %112 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 13, ptr %112, align 4, !tbaa !10
  br label %113

113:                                              ; preds = %111, %109
  br label %114

114:                                              ; preds = %113, %102
  br label %115

115:                                              ; preds = %114, %95
  br label %116

116:                                              ; preds = %115, %88
  br label %229

117:                                              ; preds = %2
  %118 = load i8, ptr %5, align 1, !tbaa !9
  %119 = zext i8 %118 to i32
  %120 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %121 = load i32, ptr %120, align 8, !tbaa !17
  %122 = mul nsw i32 %121, 8
  %123 = shl i32 %119, %122
  %124 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 7
  %125 = load i32, ptr %124, align 4, !tbaa !20
  %126 = add nsw i32 %125, %123
  store i32 %126, ptr %124, align 4, !tbaa !20
  %127 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %128 = load i32, ptr %127, align 8, !tbaa !17
  %129 = icmp eq i32 %128, 1
  br i1 %129, label %130, label %133

130:                                              ; preds = %117
  %131 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 9, ptr %131, align 4, !tbaa !10
  %132 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  store i32 0, ptr %132, align 8, !tbaa !17
  br label %137

133:                                              ; preds = %117
  %134 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %135 = load i32, ptr %134, align 8, !tbaa !17
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %134, align 8, !tbaa !17
  br label %137

137:                                              ; preds = %133, %130
  br label %229

138:                                              ; preds = %2
  %139 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 7
  %140 = load i32, ptr %139, align 4, !tbaa !20
  %141 = add nsw i32 %140, -1
  store i32 %141, ptr %139, align 4, !tbaa !20
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %169

143:                                              ; preds = %138
  %144 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %145 = load i32, ptr %144, align 8, !tbaa !16
  %146 = and i32 %145, 8
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %150

148:                                              ; preds = %143
  %149 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 10, ptr %149, align 4, !tbaa !10
  br label %168

150:                                              ; preds = %143
  %151 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %152 = load i32, ptr %151, align 8, !tbaa !16
  %153 = and i32 %152, 16
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %157

155:                                              ; preds = %150
  %156 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 11, ptr %156, align 4, !tbaa !10
  br label %167

157:                                              ; preds = %150
  %158 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %159 = load i32, ptr %158, align 8, !tbaa !16
  %160 = and i32 %159, 2
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %164

162:                                              ; preds = %157
  %163 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 12, ptr %163, align 4, !tbaa !10
  br label %166

164:                                              ; preds = %157
  %165 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 13, ptr %165, align 4, !tbaa !10
  br label %166

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

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

168:                                              ; preds = %167, %148
  br label %169

169:                                              ; preds = %168, %138
  br label %229

170:                                              ; preds = %2
  %171 = load i8, ptr %4, align 1, !tbaa !9
  %172 = sext i8 %171 to i32
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %178

174:                                              ; preds = %170
  %175 = load i8, ptr %4, align 1, !tbaa !9
  %176 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 0
  %177 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %176, i8 noundef signext %175)
  br label %196

178:                                              ; preds = %170
  %179 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %180 = load i32, ptr %179, align 8, !tbaa !16
  %181 = and i32 %180, 16
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %185

183:                                              ; preds = %178
  %184 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 11, ptr %184, align 4, !tbaa !10
  br label %195

185:                                              ; preds = %178
  %186 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %187 = load i32, ptr %186, align 8, !tbaa !16
  %188 = and i32 %187, 2
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %185
  %191 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 12, ptr %191, align 4, !tbaa !10
  br label %194

192:                                              ; preds = %185
  %193 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 13, ptr %193, align 4, !tbaa !10
  br label %194

194:                                              ; preds = %192, %190
  br label %195

195:                                              ; preds = %194, %183
  br label %196

196:                                              ; preds = %195, %174
  br label %229

197:                                              ; preds = %2
  %198 = load i8, ptr %4, align 1, !tbaa !9
  %199 = sext i8 %198 to i32
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %205

201:                                              ; preds = %197
  %202 = load i8, ptr %4, align 1, !tbaa !9
  %203 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 1
  %204 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %203, i8 noundef signext %202)
  br label %215

205:                                              ; preds = %197
  %206 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 4
  %207 = load i32, ptr %206, align 8, !tbaa !16
  %208 = and i32 %207, 2
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %212

210:                                              ; preds = %205
  %211 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 12, ptr %211, align 4, !tbaa !10
  br label %214

212:                                              ; preds = %205
  %213 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 13, ptr %213, align 4, !tbaa !10
  br label %214

214:                                              ; preds = %212, %210
  br label %215

215:                                              ; preds = %214, %201
  br label %229

216:                                              ; preds = %2
  %217 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %218 = load i32, ptr %217, align 8, !tbaa !17
  %219 = icmp eq i32 %218, 1
  br i1 %219, label %220, label %223

220:                                              ; preds = %216
  %221 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 5
  store i32 13, ptr %221, align 4, !tbaa !10
  %222 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  store i32 0, ptr %222, align 8, !tbaa !17
  br label %227

223:                                              ; preds = %216
  %224 = getelementptr inbounds %"class.boost::iostreams::detail::gzip_header", ptr %11, i32 0, i32 6
  %225 = load i32, ptr %224, align 8, !tbaa !17
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %224, align 8, !tbaa !17
  br label %227

227:                                              ; preds = %223, %220
  br label %229

228:                                              ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__._ZN5boost9iostreams6detail11gzip_header7processEc) #7
  unreachable

229:                                              ; preds = %227, %215, %196, %169, %137, %116, %78, %77, %51, %49, %37, %25
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

230:                                              ; preds = %45, %33, %21
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %231

231:                                              ; preds = %230
  %232 = load ptr, ptr %7, align 8
  %233 = load i32, ptr %8, align 4
  %234 = insertvalue { ptr, i32 } poison, ptr %232, 0
  %235 = insertvalue { ptr, i32 } %234, i32 %233, 1
  resume { ptr, i32 } %235
}

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

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !15, i64 84}
!11 = !{!"_ZTSN5boost9iostreams6detail11gzip_headerE", !12, i64 0, !12, i64 32, !15, i64 64, !14, i64 72, !15, i64 80, !15, i64 84, !15, i64 88, !15, i64 92}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!11, !15, i64 80}
!17 = !{!11, !15, i64 88}
!18 = !{!11, !14, i64 72}
!19 = !{!11, !15, i64 64}
!20 = !{!11, !15, i64 92}


; 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.boost::iostreams::gzip_error" = type { %"class.std::ios_base::failure", i32, i32 }
%"class.std::ios_base::failure" = type { %"class.std::system_error" }
%"class.std::system_error" = type { %"class.std::runtime_error", %"class.std::error_code" }
%"class.std::runtime_error" = type { %"class.std::exception", %"struct.std::__cow_string" }
%"class.std::exception" = type { ptr }
%"struct.std::__cow_string" = type { %union.anon.0 }
%union.anon.0 = type { ptr }
%"class.std::error_code" = type { i32, ptr }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN5boost9iostreams6detail11gzip_header7processEc = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9iostreams6detail11gzip_header7processEc(ptr noundef nonnull align 8 dereferenceable(96) %0, i8 noundef signext %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.boost::iostreams::gzip_error", align 8
  %4 = alloca %"class.boost::iostreams::gzip_error", align 8
  %5 = alloca %"class.boost::iostreams::gzip_error", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 84
  %7 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %7, label %120 [
    i32 1, label %8
    i32 2, label %14
    i32 3, label %20
    i32 4, label %26
    i32 5, label %29
    i32 6, label %43
    i32 7, label %44
    i32 8, label %61
    i32 9, label %74
    i32 10, label %91
    i32 11, label %103
    i32 12, label %113
  ]

8:                                                ; preds = %2
  %.not31 = icmp eq i8 %1, 31
  br i1 %.not31, label %13, label %9

9:                                                ; preds = %8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #5
  call void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40) %3, i32 noundef 4)
  invoke void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40) %3) #6
          to label %10 unwind label %11

10:                                               ; preds = %9
  unreachable

11:                                               ; preds = %9
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt8ios_base7failureB5cxx11D2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #5
  br label %122

13:                                               ; preds = %8
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %121

14:                                               ; preds = %2
  %.not30 = icmp eq i8 %1, -117
  br i1 %.not30, label %19, label %15

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  call void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40) %4, i32 noundef 4)
  invoke void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
          to label %16 unwind label %17

16:                                               ; preds = %15
  unreachable

17:                                               ; preds = %15
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt8ios_base7failureB5cxx11D2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  br label %122

19:                                               ; preds = %14
  store i32 3, ptr %6, align 4, !tbaa !5
  br label %121

20:                                               ; preds = %2
  %.not29 = icmp eq i8 %1, 8
  br i1 %.not29, label %25, label %21

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  call void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef 6)
  invoke void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
          to label %22 unwind label %23

22:                                               ; preds = %21
  unreachable

23:                                               ; preds = %21
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt8ios_base7failureB5cxx11D2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br label %122

25:                                               ; preds = %20
  store i32 4, ptr %6, align 4, !tbaa !5
  br label %121

26:                                               ; preds = %2
  %27 = zext i8 %1 to i32
  %28 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 %27, ptr %28, align 8, !tbaa !14
  store i32 5, ptr %6, align 4, !tbaa !5
  br label %121

29:                                               ; preds = %2
  %30 = zext i8 %1 to i32
  %31 = getelementptr inbounds i8, ptr %0, i64 88
  %32 = load i32, ptr %31, align 8, !tbaa !15
  %33 = shl nsw i32 %32, 3
  %34 = shl i32 %30, %33
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %0, i64 72
  %37 = load i64, ptr %36, align 8, !tbaa !16
  %38 = add nsw i64 %37, %35
  store i64 %38, ptr %36, align 8, !tbaa !16
  %39 = icmp eq i32 %32, 3
  br i1 %39, label %40, label %41

40:                                               ; preds = %29
  store i32 6, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %31, align 8, !tbaa !15
  br label %121

41:                                               ; preds = %29
  %42 = add nsw i32 %32, 1
  store i32 %42, ptr %31, align 8, !tbaa !15
  br label %121

43:                                               ; preds = %2
  store i32 7, ptr %6, align 4, !tbaa !5
  br label %121

44:                                               ; preds = %2
  %45 = zext i8 %1 to i32
  %46 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %45, ptr %46, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %0, i64 80
  %48 = load i32, ptr %47, align 8, !tbaa !14
  %49 = and i32 %48, 4
  %.not25 = icmp eq i32 %49, 0
  br i1 %.not25, label %51, label %50

50:                                               ; preds = %44
  store i32 9, ptr %6, align 4, !tbaa !5
  br label %121

51:                                               ; preds = %44
  %52 = and i32 %48, 8
  %.not26 = icmp eq i32 %52, 0
  br i1 %.not26, label %54, label %53

53:                                               ; preds = %51
  store i32 10, ptr %6, align 4, !tbaa !5
  br label %121

54:                                               ; preds = %51
  %55 = and i32 %48, 16
  %.not27 = icmp eq i32 %55, 0
  br i1 %.not27, label %57, label %56

56:                                               ; preds = %54
  store i32 11, ptr %6, align 4, !tbaa !5
  br label %121

57:                                               ; preds = %54
  %58 = and i32 %48, 2
  %.not28 = icmp eq i32 %58, 0
  br i1 %.not28, label %60, label %59

59:                                               ; preds = %57
  store i32 12, ptr %6, align 4, !tbaa !5
  br label %121

60:                                               ; preds = %57
  store i32 13, ptr %6, align 4, !tbaa !5
  br label %121

61:                                               ; preds = %2
  %62 = zext i8 %1 to i32
  %63 = getelementptr inbounds i8, ptr %0, i64 88
  %64 = load i32, ptr %63, align 8, !tbaa !15
  %65 = shl nsw i32 %64, 3
  %66 = shl i32 %62, %65
  %67 = getelementptr inbounds i8, ptr %0, i64 92
  %68 = load i32, ptr %67, align 4, !tbaa !18
  %69 = add nsw i32 %66, %68
  store i32 %69, ptr %67, align 4, !tbaa !18
  %70 = icmp eq i32 %64, 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %61
  store i32 9, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %63, align 8, !tbaa !15
  br label %121

72:                                               ; preds = %61
  %73 = add nsw i32 %64, 1
  store i32 %73, ptr %63, align 8, !tbaa !15
  br label %121

74:                                               ; preds = %2
  %75 = getelementptr inbounds i8, ptr %0, i64 92
  %76 = load i32, ptr %75, align 4, !tbaa !18
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %75, align 4, !tbaa !18
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %121

79:                                               ; preds = %74
  %80 = getelementptr inbounds i8, ptr %0, i64 80
  %81 = load i32, ptr %80, align 8, !tbaa !14
  %82 = and i32 %81, 8
  %.not22 = icmp eq i32 %82, 0
  br i1 %.not22, label %84, label %83

83:                                               ; preds = %79
  store i32 10, ptr %6, align 4, !tbaa !5
  br label %121

84:                                               ; preds = %79
  %85 = and i32 %81, 16
  %.not23 = icmp eq i32 %85, 0
  br i1 %.not23, label %87, label %86

86:                                               ; preds = %84
  store i32 11, ptr %6, align 4, !tbaa !5
  br label %121

87:                                               ; preds = %84
  %88 = and i32 %81, 2
  %.not24 = icmp eq i32 %88, 0
  br i1 %.not24, label %90, label %89

89:                                               ; preds = %87
  store i32 12, ptr %6, align 4, !tbaa !5
  br label %121

90:                                               ; preds = %87
  store i32 13, ptr %6, align 4, !tbaa !5
  br label %121

91:                                               ; preds = %2
  %.not19 = icmp eq i8 %1, 0
  br i1 %.not19, label %94, label %92

92:                                               ; preds = %91
  %93 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %1)
  br label %121

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %0, i64 80
  %96 = load i32, ptr %95, align 8, !tbaa !14
  %97 = and i32 %96, 16
  %.not20 = icmp eq i32 %97, 0
  br i1 %.not20, label %99, label %98

98:                                               ; preds = %94
  store i32 11, ptr %6, align 4, !tbaa !5
  br label %121

99:                                               ; preds = %94
  %100 = and i32 %96, 2
  %.not21 = icmp eq i32 %100, 0
  br i1 %.not21, label %102, label %101

101:                                              ; preds = %99
  store i32 12, ptr %6, align 4, !tbaa !5
  br label %121

102:                                              ; preds = %99
  store i32 13, ptr %6, align 4, !tbaa !5
  br label %121

103:                                              ; preds = %2
  %.not = icmp eq i8 %1, 0
  br i1 %.not, label %107, label %104

104:                                              ; preds = %103
  %105 = getelementptr inbounds i8, ptr %0, i64 32
  %106 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %105, i8 noundef signext %1)
  br label %121

107:                                              ; preds = %103
  %108 = getelementptr inbounds i8, ptr %0, i64 80
  %109 = load i32, ptr %108, align 8, !tbaa !14
  %110 = and i32 %109, 2
  %.not18 = icmp eq i32 %110, 0
  br i1 %.not18, label %112, label %111

111:                                              ; preds = %107
  store i32 12, ptr %6, align 4, !tbaa !5
  br label %121

112:                                              ; preds = %107
  store i32 13, ptr %6, align 4, !tbaa !5
  br label %121

113:                                              ; preds = %2
  %114 = getelementptr inbounds i8, ptr %0, i64 88
  %115 = load i32, ptr %114, align 8, !tbaa !15
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %117, label %118

117:                                              ; preds = %113
  store i32 13, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %114, align 8, !tbaa !15
  br label %121

118:                                              ; preds = %113
  %119 = add nsw i32 %115, 1
  store i32 %119, ptr %114, align 8, !tbaa !15
  br label %121

120:                                              ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5boost9iostreams6detail11gzip_header7processEc) #7
  unreachable

121:                                              ; preds = %117, %118, %104, %112, %111, %92, %101, %102, %98, %74, %86, %90, %89, %83, %71, %72, %50, %56, %60, %59, %53, %40, %41, %43, %26, %25, %19, %13
  ret void

122:                                              ; preds = %23, %17, %11
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %18, %17 ], [ %12, %11 ]
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_ZN5boost15throw_exceptionINS_9iostreams10gzip_errorEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost9iostreams10gzip_errorC2Ei(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress noreturn 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 = { 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 #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }
attributes #7 = { noreturn 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, !13, i64 84}
!6 = !{!"_ZTSN5boost9iostreams6detail11gzip_headerE", !7, i64 0, !7, i64 32, !13, i64 64, !12, i64 72, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!6, !13, i64 80}
!15 = !{!6, !13, i64 88}
!16 = !{!6, !12, i64 72}
!17 = !{!6, !13, i64 64}
!18 = !{!6, !13, i64 92}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass