; LLVM IR from BitFunnel/NativeJIT :: src/CodeGen/X64CodeGenerator.ll (ZN9NativeJIT16X64CodeGenerator11CodePrinter10PrintBytesEjj)

; 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.NativeJIT::IosMiniStateRestorer" = type <{ ptr, i32, [4 x i8], i64, i8, [7 x i8] }>
%"struct.std::_Setw" = type { i32 }
%"class.NativeJIT::X64CodeGenerator::CodePrinter" = type { ptr, i32, ptr }

@.str.68 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [3 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare noundef signext i8 @_ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc(ptr noundef nonnull align 8 dereferenceable(264), i8 noundef signext) #1 align 2

; 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) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT16X64CodeGenerator11CodePrinter10PrintBytesEjj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.NativeJIT::IosMiniStateRestorer", align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.std::_Setw", align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Setw", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  %16 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = getelementptr i8, ptr %18, i64 -24
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr %17, i64 %20
  call void @_ZN9NativeJIT20IosMiniStateRestorerC1ERSt9basic_iosIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(264) %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %22 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = invoke noundef ptr @_ZNK9NativeJIT10CodeBuffer11BufferStartEv(ptr noundef nonnull align 8 dereferenceable(96) %23)
          to label %25 unwind label %92

25:                                               ; preds = %3
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds i8, ptr %24, i64 %27
  store ptr %28, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %29 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = invoke noundef ptr @_ZNK9NativeJIT10CodeBuffer11BufferStartEv(ptr noundef nonnull align 8 dereferenceable(96) %30)
          to label %32 unwind label %96

32:                                               ; preds = %25
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds i8, ptr %31, i64 %34
  store ptr %35, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr %37, i64 %40
  %42 = invoke noundef signext i8 @_ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc(ptr noundef nonnull align 8 dereferenceable(264) %41, i8 noundef signext 48)
          to label %43 unwind label %96

43:                                               ; preds = %32
  %44 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.68)
          to label %47 unwind label %96

47:                                               ; preds = %43
  %48 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @_ZSt9uppercaseRSt8ios_base)
          to label %51 unwind label %96

51:                                               ; preds = %47
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @_ZSt3hexRSt8ios_base)
          to label %53 unwind label %96

53:                                               ; preds = %51
  %54 = invoke i32 @_ZSt4setwi(i32 noundef 8)
          to label %55 unwind label %96

55:                                               ; preds = %53
  %56 = getelementptr inbounds %"struct.std::_Setw", ptr %12, i32 0, i32 0
  store i32 %54, ptr %56, align 4
  %57 = getelementptr inbounds %"struct.std::_Setw", ptr %12, i32 0, i32 0
  %58 = load i32, ptr %57, align 4
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %52, i32 %58)
          to label %60 unwind label %96

60:                                               ; preds = %55
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %59, i32 noundef %61)
          to label %63 unwind label %96

63:                                               ; preds = %60
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @.str.69)
          to label %65 unwind label %96

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 11, ptr %13, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %89, %65
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = icmp ult ptr %67, %68
  br i1 %69, label %70, label %104

70:                                               ; preds = %66
  %71 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = invoke i32 @_ZSt4setwi(i32 noundef 2)
          to label %74 unwind label %100

74:                                               ; preds = %70
  %75 = getelementptr inbounds %"struct.std::_Setw", ptr %14, i32 0, i32 0
  store i32 %73, ptr %75, align 4
  %76 = getelementptr inbounds %"struct.std::_Setw", ptr %14, i32 0, i32 0
  %77 = load i32, ptr %76, align 4
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %72, i32 %77)
          to label %79 unwind label %100

79:                                               ; preds = %74
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i32 1
  store ptr %81, ptr %8, align 8, !tbaa !5
  %82 = load i8, ptr %80, align 1, !tbaa !16
  %83 = zext i8 %82 to i32
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %78, i32 noundef %83)
          to label %85 unwind label %100

85:                                               ; preds = %79
  %86 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @.str.68)
          to label %89 unwind label %100

89:                                               ; preds = %85
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = add i32 %90, 3
  store i32 %91, ptr %13, align 4, !tbaa !9
  br label %66, !llvm.loop !17

92:                                               ; preds = %3
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  br label %117

96:                                               ; preds = %63, %60, %55, %53, %51, %47, %43, %32, %25
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %116

100:                                              ; preds = %108, %85, %79, %74, %70
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %116

104:                                              ; preds = %66
  br label %105

105:                                              ; preds = %112, %104
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = icmp ult i32 %106, 36
  br i1 %107, label %108, label %115

108:                                              ; preds = %105
  %109 = getelementptr inbounds %"class.NativeJIT::X64CodeGenerator::CodePrinter", ptr %15, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %110, i8 noundef signext 32)
          to label %112 unwind label %100

112:                                              ; preds = %108
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = add i32 %113, 1
  store i32 %114, ptr %13, align 4, !tbaa !9
  br label %105, !llvm.loop !19

115:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN9NativeJIT20IosMiniStateRestorerD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  ret void

116:                                              ; preds = %100, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %117

117:                                              ; preds = %116, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN9NativeJIT20IosMiniStateRestorerD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %9, align 8
  %120 = load i32, ptr %10, align 4
  %121 = insertvalue { ptr, i32 } poison, ptr %119, 0
  %122 = insertvalue { ptr, i32 } %121, i32 %120, 1
  resume { ptr, i32 } %122
}

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

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

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

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

declare noundef ptr @_ZNK9NativeJIT10CodeBuffer11BufferStartEv(ptr noundef nonnull align 8 dereferenceable(96)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8), i32) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt4setwi(i32 noundef) #4

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

declare void @_ZN9NativeJIT20IosMiniStateRestorerC1ERSt9basic_iosIcSt11char_traitsIcEE(ptr, ptr)

declare void @_ZN9NativeJIT20IosMiniStateRestorerD1Ev(ptr)

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 = { 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 #3 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTSN9NativeJIT16X64CodeGenerator11CodePrinterE", !6, i64 0, !10, i64 8, !6, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!12, !6, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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.NativeJIT::IosMiniStateRestorer" = type <{ ptr, i32, [4 x i8], i64, i8, [7 x i8] }>

@.str.68 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [3 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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT16X64CodeGenerator11CodePrinter10PrintBytesEjj(ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.NativeJIT::IosMiniStateRestorer", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = load ptr, ptr %6, align 8, !tbaa !11
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %6, i64 %9
  call void @_ZN9NativeJIT20IosMiniStateRestorerC1ERSt9basic_iosIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(264) %10)
  %11 = load ptr, ptr %0, align 8, !tbaa !13
  %12 = invoke noundef ptr @_ZNK9NativeJIT10CodeBuffer11BufferStartEv(ptr noundef nonnull align 8 dereferenceable(96) %11)
          to label %13 unwind label %56

13:                                               ; preds = %3
  %14 = zext i32 %1 to i64
  %15 = getelementptr inbounds i8, ptr %12, i64 %14
  %16 = load ptr, ptr %0, align 8, !tbaa !13
  %17 = invoke noundef ptr @_ZNK9NativeJIT10CodeBuffer11BufferStartEv(ptr noundef nonnull align 8 dereferenceable(96) %16)
          to label %18 unwind label %58

18:                                               ; preds = %13
  %19 = zext i32 %2 to i64
  %20 = getelementptr inbounds i8, ptr %17, i64 %19
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  %26 = invoke noundef signext i8 @_ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc(ptr noundef nonnull align 8 dereferenceable(264) %25, i8 noundef signext 48)
          to label %27 unwind label %58

27:                                               ; preds = %18
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str.68)
          to label %30 unwind label %58

30:                                               ; preds = %27
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @_ZSt9uppercaseRSt8ios_base)
          to label %33 unwind label %58

33:                                               ; preds = %30
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
          to label %35 unwind label %58

35:                                               ; preds = %33
  %36 = call i32 @_ZSt4setwi(i32 noundef 8)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %34, i32 %36)
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef %1)
          to label %39 unwind label %58

39:                                               ; preds = %35
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.69)
          to label %.preheader19 unwind label %58

.preheader19:                                     ; preds = %39
  %41 = icmp ult ptr %15, %20
  br i1 %41, label %.lr.ph, label %.lr.ph24.preheader

.preheader:                                       ; preds = %53
  %42 = icmp ult i32 %54, 36
  br i1 %42, label %.lr.ph24.preheader, label %._crit_edge

.lr.ph24.preheader:                               ; preds = %.preheader19, %.preheader
  %.123.ph = phi i32 [ 11, %.preheader19 ], [ %54, %.preheader ]
  br label %.lr.ph24

.lr.ph:                                           ; preds = %.preheader19, %53
  %.022 = phi ptr [ %46, %53 ], [ %15, %.preheader19 ]
  %.01221 = phi i32 [ %54, %53 ], [ 11, %.preheader19 ]
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call i32 @_ZSt4setwi(i32 noundef 2)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %43, i32 %44)
  %46 = getelementptr inbounds i8, ptr %.022, i64 1
  %47 = load i8, ptr %.022, align 1, !tbaa !14
  %48 = zext i8 %47 to i32
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef %48)
          to label %50 unwind label %.loopexit.split-lp

50:                                               ; preds = %.lr.ph
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @.str.68)
          to label %53 unwind label %.loopexit.split-lp

53:                                               ; preds = %50
  %54 = add i32 %.01221, 3
  %55 = icmp ult ptr %46, %20
  br i1 %55, label %.lr.ph, label %.preheader, !llvm.loop !15

56:                                               ; preds = %3
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %64

58:                                               ; preds = %39, %35, %33, %30, %27, %18, %13
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit:                                        ; preds = %.lr.ph24
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit.split-lp:                               ; preds = %.lr.ph, %50
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %64

.lr.ph24:                                         ; preds = %.lr.ph24.preheader, %62
  %.123 = phi i32 [ %63, %62 ], [ %.123.ph, %.lr.ph24.preheader ]
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %60, i8 noundef signext 32)
          to label %62 unwind label %.loopexit

62:                                               ; preds = %.lr.ph24
  %63 = add i32 %.123, 1
  %exitcond.not = icmp eq i32 %63, 36
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph24, !llvm.loop !17

._crit_edge:                                      ; preds = %62, %.preheader
  call void @_ZN9NativeJIT20IosMiniStateRestorerD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  ret void

64:                                               ; preds = %.loopexit, %.loopexit.split-lp, %58, %56
  %.pn.pn = phi { ptr, i32 } [ %57, %56 ], [ %59, %58 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN9NativeJIT20IosMiniStateRestorerD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn
}

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

; 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: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt9uppercaseRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #2

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

declare noundef ptr @_ZNK9NativeJIT10CodeBuffer11BufferStartEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt4setwi(i32 noundef) local_unnamed_addr #4

; 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

declare void @_ZN9NativeJIT20IosMiniStateRestorerC1ERSt9basic_iosIcSt11char_traitsIcEE(ptr, ptr) local_unnamed_addr

declare void @_ZN9NativeJIT20IosMiniStateRestorerD1Ev(ptr) local_unnamed_addr

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 = { 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 #3 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !7, i64 16}
!6 = !{!"_ZTSN9NativeJIT16X64CodeGenerator11CodePrinterE", !7, i64 0, !10, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !9, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!8, !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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