; LLVM IR from thepowersgang/mrustc :: src/debug.ll (ZlsRSoRK10FmtEscaped)

; 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.FmtEscaped = type { ptr, ptr }

@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [2 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK10FmtEscaped(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef @_ZSt3hexRSt8ios_base)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %class.FmtEscaped, ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %15, ptr %5, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %235, %2
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %class.FmtEscaped, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = icmp ne ptr %17, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %238

23:                                               ; preds = %16
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load i8, ptr %24, align 1, !tbaa !12
  %26 = sext i8 %25 to i32
  switch i32 %26, label %39 [
    i32 0, label %27
    i32 10, label %30
    i32 92, label %33
    i32 34, label %36
  ]

27:                                               ; preds = %23
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef @.str.19)
  br label %234

30:                                               ; preds = %23
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str.20)
  br label %234

33:                                               ; preds = %23
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef @.str.21)
  br label %234

36:                                               ; preds = %23
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.22)
  br label %234

39:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !12
  store i8 %41, ptr %7, align 1, !tbaa !12
  %42 = load i8, ptr %7, align 1, !tbaa !12
  %43 = zext i8 %42 to i32
  %44 = icmp slt i32 %43, 128
  br i1 %44, label %45, label %66

45:                                               ; preds = %39
  %46 = load i8, ptr %7, align 1, !tbaa !12
  %47 = zext i8 %46 to i32
  %48 = icmp slt i32 %47, 32
  br i1 %48, label %53, label %49

49:                                               ; preds = %45
  %50 = load i8, ptr %7, align 1, !tbaa !12
  %51 = zext i8 %50 to i32
  %52 = icmp sgt i32 %51, 127
  br i1 %52, label %53, label %61

53:                                               ; preds = %49, %45
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef @.str.23)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @_ZSt3hexRSt8ios_base)
  %57 = load i8, ptr %7, align 1, !tbaa !12
  %58 = zext i8 %57 to i32
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %56, i32 noundef %58)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef @.str.24)
  br label %65

61:                                               ; preds = %49
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = load i8, ptr %7, align 1, !tbaa !12
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_h(ptr noundef nonnull align 8 dereferenceable(8) %62, i8 noundef zeroext %63)
  br label %65

65:                                               ; preds = %61, %53
  br label %231

66:                                               ; preds = %39
  %67 = load i8, ptr %7, align 1, !tbaa !12
  %68 = zext i8 %67 to i32
  %69 = icmp slt i32 %68, 192
  br i1 %69, label %70, label %71

70:                                               ; preds = %66
  br label %230

71:                                               ; preds = %66
  %72 = load i8, ptr %7, align 1, !tbaa !12
  %73 = zext i8 %72 to i32
  %74 = icmp slt i32 %73, 224
  br i1 %74, label %75, label %106

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %76 = load i8, ptr %7, align 1, !tbaa !12
  %77 = zext i8 %76 to i32
  %78 = and i32 %77, 31
  %79 = shl i32 %78, 6
  store i32 %79, ptr %8, align 4, !tbaa !13
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i32 1
  store ptr %81, ptr %5, align 8, !tbaa !5
  %82 = load i8, ptr %81, align 1, !tbaa !12
  store i8 %82, ptr %7, align 1, !tbaa !12
  %83 = load i8, ptr %7, align 1, !tbaa !12
  %84 = zext i8 %83 to i32
  %85 = and i32 %84, 192
  %86 = icmp ne i32 %85, 128
  br i1 %86, label %87, label %90

87:                                               ; preds = %75
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i32 -1
  store ptr %89, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %103

90:                                               ; preds = %75
  %91 = load i8, ptr %7, align 1, !tbaa !12
  %92 = zext i8 %91 to i32
  %93 = and i32 %92, 63
  %94 = shl i32 %93, 0
  %95 = load i32, ptr %8, align 4, !tbaa !13
  %96 = or i32 %95, %94
  store i32 %96, ptr %8, align 4, !tbaa !13
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef @.str.23)
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @_ZSt3hexRSt8ios_base)
  %100 = load i32, ptr %8, align 4, !tbaa !13
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %99, i32 noundef %100)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @.str.24)
  store i32 0, ptr %6, align 4
  br label %103

103:                                              ; preds = %90, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %104 = load i32, ptr %6, align 4
  switch i32 %104, label %232 [
    i32 0, label %105
  ]

105:                                              ; preds = %103
  br label %229

106:                                              ; preds = %71
  %107 = load i8, ptr %7, align 1, !tbaa !12
  %108 = zext i8 %107 to i32
  %109 = icmp slt i32 %108, 240
  br i1 %109, label %110, label %158

110:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %111 = load i8, ptr %7, align 1, !tbaa !12
  %112 = zext i8 %111 to i32
  %113 = and i32 %112, 15
  %114 = shl i32 %113, 12
  store i32 %114, ptr %9, align 4, !tbaa !13
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %115, i32 1
  store ptr %116, ptr %5, align 8, !tbaa !5
  %117 = load i8, ptr %116, align 1, !tbaa !12
  store i8 %117, ptr %7, align 1, !tbaa !12
  %118 = load i8, ptr %7, align 1, !tbaa !12
  %119 = zext i8 %118 to i32
  %120 = and i32 %119, 192
  %121 = icmp ne i32 %120, 128
  br i1 %121, label %122, label %125

122:                                              ; preds = %110
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds i8, ptr %123, i32 -1
  store ptr %124, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %155

125:                                              ; preds = %110
  %126 = load i8, ptr %7, align 1, !tbaa !12
  %127 = zext i8 %126 to i32
  %128 = and i32 %127, 63
  %129 = shl i32 %128, 6
  %130 = load i32, ptr %9, align 4, !tbaa !13
  %131 = or i32 %130, %129
  store i32 %131, ptr %9, align 4, !tbaa !13
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i32 1
  store ptr %133, ptr %5, align 8, !tbaa !5
  %134 = load i8, ptr %133, align 1, !tbaa !12
  store i8 %134, ptr %7, align 1, !tbaa !12
  %135 = load i8, ptr %7, align 1, !tbaa !12
  %136 = zext i8 %135 to i32
  %137 = and i32 %136, 192
  %138 = icmp ne i32 %137, 128
  br i1 %138, label %139, label %142

139:                                              ; preds = %125
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i32 -1
  store ptr %141, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %155

142:                                              ; preds = %125
  %143 = load i8, ptr %7, align 1, !tbaa !12
  %144 = zext i8 %143 to i32
  %145 = and i32 %144, 63
  %146 = shl i32 %145, 0
  %147 = load i32, ptr %9, align 4, !tbaa !13
  %148 = or i32 %147, %146
  store i32 %148, ptr %9, align 4, !tbaa !13
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %149, ptr noundef @.str.23)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef @_ZSt3hexRSt8ios_base)
  %152 = load i32, ptr %9, align 4, !tbaa !13
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef %152)
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @.str.24)
  store i32 0, ptr %6, align 4
  br label %155

155:                                              ; preds = %142, %139, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  %156 = load i32, ptr %6, align 4
  switch i32 %156, label %232 [
    i32 0, label %157
  ]

157:                                              ; preds = %155
  br label %228

158:                                              ; preds = %106
  %159 = load i8, ptr %7, align 1, !tbaa !12
  %160 = zext i8 %159 to i32
  %161 = icmp slt i32 %160, 248
  br i1 %161, label %162, label %227

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %163 = load i8, ptr %7, align 1, !tbaa !12
  %164 = zext i8 %163 to i32
  %165 = and i32 %164, 7
  %166 = shl i32 %165, 18
  store i32 %166, ptr %10, align 4, !tbaa !13
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds i8, ptr %167, i32 1
  store ptr %168, ptr %5, align 8, !tbaa !5
  %169 = load i8, ptr %168, align 1, !tbaa !12
  store i8 %169, ptr %7, align 1, !tbaa !12
  %170 = load i8, ptr %7, align 1, !tbaa !12
  %171 = zext i8 %170 to i32
  %172 = and i32 %171, 192
  %173 = icmp ne i32 %172, 128
  br i1 %173, label %174, label %177

174:                                              ; preds = %162
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds i8, ptr %175, i32 -1
  store ptr %176, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %224

177:                                              ; preds = %162
  %178 = load i8, ptr %7, align 1, !tbaa !12
  %179 = zext i8 %178 to i32
  %180 = and i32 %179, 63
  %181 = shl i32 %180, 12
  %182 = load i32, ptr %10, align 4, !tbaa !13
  %183 = or i32 %182, %181
  store i32 %183, ptr %10, align 4, !tbaa !13
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds i8, ptr %184, i32 1
  store ptr %185, ptr %5, align 8, !tbaa !5
  %186 = load i8, ptr %185, align 1, !tbaa !12
  store i8 %186, ptr %7, align 1, !tbaa !12
  %187 = load i8, ptr %7, align 1, !tbaa !12
  %188 = zext i8 %187 to i32
  %189 = and i32 %188, 192
  %190 = icmp ne i32 %189, 128
  br i1 %190, label %191, label %194

191:                                              ; preds = %177
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = getelementptr inbounds i8, ptr %192, i32 -1
  store ptr %193, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %224

194:                                              ; preds = %177
  %195 = load i8, ptr %7, align 1, !tbaa !12
  %196 = zext i8 %195 to i32
  %197 = and i32 %196, 63
  %198 = shl i32 %197, 6
  %199 = load i32, ptr %10, align 4, !tbaa !13
  %200 = or i32 %199, %198
  store i32 %200, ptr %10, align 4, !tbaa !13
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds i8, ptr %201, i32 1
  store ptr %202, ptr %5, align 8, !tbaa !5
  %203 = load i8, ptr %202, align 1, !tbaa !12
  store i8 %203, ptr %7, align 1, !tbaa !12
  %204 = load i8, ptr %7, align 1, !tbaa !12
  %205 = zext i8 %204 to i32
  %206 = and i32 %205, 192
  %207 = icmp ne i32 %206, 128
  br i1 %207, label %208, label %211

208:                                              ; preds = %194
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds i8, ptr %209, i32 -1
  store ptr %210, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %224

211:                                              ; preds = %194
  %212 = load i8, ptr %7, align 1, !tbaa !12
  %213 = zext i8 %212 to i32
  %214 = and i32 %213, 63
  %215 = shl i32 %214, 0
  %216 = load i32, ptr %10, align 4, !tbaa !13
  %217 = or i32 %216, %215
  store i32 %217, ptr %10, align 4, !tbaa !13
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef @.str.23)
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %219, ptr noundef @_ZSt3hexRSt8ios_base)
  %221 = load i32, ptr %10, align 4, !tbaa !13
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %220, i32 noundef %221)
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %222, ptr noundef @.str.24)
  store i32 0, ptr %6, align 4
  br label %224

224:                                              ; preds = %211, %208, %191, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %225 = load i32, ptr %6, align 4
  switch i32 %225, label %232 [
    i32 0, label %226
  ]

226:                                              ; preds = %224
  br label %227

227:                                              ; preds = %226, %158
  br label %228

228:                                              ; preds = %227, %157
  br label %229

229:                                              ; preds = %228, %105
  br label %230

230:                                              ; preds = %229, %70
  br label %231

231:                                              ; preds = %230, %65
  store i32 5, ptr %6, align 4
  br label %232

232:                                              ; preds = %231, %224, %155, %103
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  %233 = load i32, ptr %6, align 4
  switch i32 %233, label %242 [
    i32 4, label %235
    i32 5, label %234
  ]

234:                                              ; preds = %232, %36, %33, %30, %27
  br label %235

235:                                              ; preds = %234, %232
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = getelementptr inbounds i8, ptr %236, i32 1
  store ptr %237, ptr %5, align 8, !tbaa !5
  br label %16, !llvm.loop !15

238:                                              ; preds = %22
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef @_ZSt3decRSt8ios_base)
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  ret ptr %241

242:                                              ; preds = %232
  unreachable
}

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

; 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

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

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

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

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

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


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

@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK10FmtEscaped(ptr noundef nonnull returned align 8 dereferenceable(8) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %1) local_unnamed_addr #1 {
  %3 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !10
  %.not80 = icmp eq ptr %4, %6
  br i1 %.not80, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %103, %2
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  ret ptr %0

.lr.ph:                                           ; preds = %2, %103
  %.06981 = phi ptr [ %104, %103 ], [ %4, %2 ]
  %8 = load i8, ptr %.06981, align 1, !tbaa !11
  switch i8 %8, label %17 [
    i8 0, label %9
    i8 10, label %11
    i8 92, label %13
    i8 34, label %15
  ]

9:                                                ; preds = %.lr.ph
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.19)
  br label %103

11:                                               ; preds = %.lr.ph
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.20)
  br label %103

13:                                               ; preds = %.lr.ph
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.21)
  br label %103

15:                                               ; preds = %.lr.ph
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.22)
  br label %103

17:                                               ; preds = %.lr.ph
  %18 = zext i8 %8 to i32
  %19 = icmp sgt i8 %8, -1
  br i1 %19, label %20, label %29

20:                                               ; preds = %17
  %21 = icmp ult i8 %8, 32
  br i1 %21, label %22, label %27

22:                                               ; preds = %20
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.23)
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef %18)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.24)
  br label %103

27:                                               ; preds = %20
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_h(ptr noundef nonnull align 8 dereferenceable(8) %0, i8 noundef zeroext %8)
  br label %103

29:                                               ; preds = %17
  %30 = icmp ult i8 %8, -64
  br i1 %30, label %103, label %31

31:                                               ; preds = %29
  %32 = icmp ult i8 %8, -32
  br i1 %32, label %33, label %47

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %.06981, i64 1
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = zext i8 %35 to i32
  %37 = and i32 %36, 192
  %.not79 = icmp eq i32 %37, 128
  br i1 %.not79, label %38, label %103

38:                                               ; preds = %33
  %39 = shl nuw nsw i32 %18, 6
  %40 = and i32 %39, 1984
  %41 = and i32 %36, 63
  %42 = or disjoint i32 %41, %40
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.23)
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %44, i32 noundef %42)
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.24)
  br label %103

47:                                               ; preds = %31
  %48 = icmp ult i8 %8, -16
  br i1 %48, label %49, label %71

49:                                               ; preds = %47
  %50 = getelementptr inbounds i8, ptr %.06981, i64 1
  %51 = load i8, ptr %50, align 1, !tbaa !11
  %52 = zext i8 %51 to i32
  %53 = and i32 %52, 192
  %.not77 = icmp eq i32 %53, 128
  br i1 %.not77, label %54, label %103

54:                                               ; preds = %49
  %55 = getelementptr inbounds i8, ptr %.06981, i64 2
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = zext i8 %56 to i32
  %58 = and i32 %57, 192
  %.not78 = icmp eq i32 %58, 128
  br i1 %.not78, label %59, label %103

59:                                               ; preds = %54
  %60 = shl nuw nsw i32 %18, 12
  %61 = and i32 %60, 61440
  %62 = shl nuw nsw i32 %52, 6
  %63 = and i32 %62, 4032
  %64 = or disjoint i32 %63, %61
  %65 = and i32 %57, 63
  %66 = or disjoint i32 %64, %65
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.23)
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef %66)
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.24)
  br label %103

71:                                               ; preds = %47
  %72 = icmp ult i8 %8, -8
  br i1 %72, label %73, label %103

73:                                               ; preds = %71
  %74 = getelementptr inbounds i8, ptr %.06981, i64 1
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = zext i8 %75 to i32
  %77 = and i32 %76, 192
  %.not74 = icmp eq i32 %77, 128
  br i1 %.not74, label %78, label %103

78:                                               ; preds = %73
  %79 = getelementptr inbounds i8, ptr %.06981, i64 2
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = zext i8 %80 to i32
  %82 = and i32 %81, 192
  %.not75 = icmp eq i32 %82, 128
  br i1 %.not75, label %83, label %103

83:                                               ; preds = %78
  %84 = getelementptr inbounds i8, ptr %.06981, i64 3
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = zext i8 %85 to i32
  %87 = and i32 %86, 192
  %.not76 = icmp eq i32 %87, 128
  br i1 %.not76, label %88, label %103

88:                                               ; preds = %83
  %89 = shl nuw nsw i32 %18, 18
  %90 = and i32 %89, 1835008
  %91 = shl nuw nsw i32 %76, 12
  %92 = and i32 %91, 258048
  %93 = or disjoint i32 %92, %90
  %94 = shl nuw nsw i32 %81, 6
  %95 = and i32 %94, 4032
  %96 = or disjoint i32 %93, %95
  %97 = and i32 %86, 63
  %98 = or disjoint i32 %96, %97
  %99 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.23)
  %100 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
  %101 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %100, i32 noundef %98)
  %102 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @.str.24)
  br label %103

103:                                              ; preds = %83, %78, %54, %88, %73, %59, %49, %38, %33, %29, %71, %22, %27, %9, %11, %13, %15
  %.6 = phi ptr [ %.06981, %15 ], [ %.06981, %13 ], [ %.06981, %11 ], [ %.06981, %9 ], [ %.06981, %22 ], [ %.06981, %27 ], [ %.06981, %29 ], [ %.06981, %71 ], [ %34, %38 ], [ %.06981, %33 ], [ %55, %59 ], [ %.06981, %49 ], [ %84, %88 ], [ %.06981, %73 ], [ %50, %54 ], [ %74, %78 ], [ %79, %83 ]
  %104 = getelementptr inbounds i8, ptr %.6, i64 1
  %105 = load ptr, ptr %5, align 8, !tbaa !10
  %.not = icmp eq ptr %104, %105
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3hexRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #0

; 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_h(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #0

attributes #0 = { 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 #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" }

!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, !7, i64 0}
!6 = !{!"_ZTS10FmtEscaped", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!8, !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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