; LLVM IR from p4lang/p4c :: lib/hex.ll (ZN2P4lsERSoRKNS_6hexvecE)

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

%"struct.std::_Setw" = type { i32 }
%"struct.std::_Setfill" = type { i8 }
%"class.P4::hexvec" = type <{ ptr, i64, i64, i32, i8, [3 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN2P4lsERSoRKNS_6hexvecE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(29) %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::_Setw", align 4
  %11 = alloca %"struct.std::_Setfill", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr %12, i64 %15
  %17 = call noundef i32 @_ZNKSt8ios_base5flagsEv(ptr noundef nonnull align 8 dereferenceable(216) %16)
  store i32 %17, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr %18, i64 %21
  %23 = call noundef signext i8 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv(ptr noundef nonnull align 8 dereferenceable(264) %22)
  store i8 %23, ptr %6, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.P4::hexvec", ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  store ptr %26, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !18
  br label %27

27:                                               ; preds = %91, %2
  %28 = load i64, ptr %8, align 8, !tbaa !18
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.P4::hexvec", ptr %29, i32 0, i32 2
  %31 = load i64, ptr %30, align 8, !tbaa !19
  %32 = icmp ult i64 %28, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %99

34:                                               ; preds = %27
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = load i64, ptr %8, align 8, !tbaa !18
  %37 = icmp ne i64 %36, 0
  %38 = zext i1 %37 to i64
  %39 = select i1 %37, i8 32, i8 91
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %35, i8 noundef signext %39)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.P4::hexvec", ptr %41, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !20
  switch i64 %43, label %59 [
    i64 1, label %44
    i64 2, label %48
    i64 4, label %52
    i64 8, label %56
  ]

44:                                               ; preds = %34
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = load i8, ptr %45, align 1, !tbaa !13
  %47 = zext i8 %46 to i64
  store i64 %47, ptr %9, align 8, !tbaa !18
  br label %70

48:                                               ; preds = %34
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i16, ptr %49, align 2, !tbaa !21
  %51 = zext i16 %50 to i64
  store i64 %51, ptr %9, align 8, !tbaa !18
  br label %70

52:                                               ; preds = %34
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load i32, ptr %53, align 4, !tbaa !23
  %55 = zext i32 %54 to i64
  store i64 %55, ptr %9, align 8, !tbaa !18
  br label %70

56:                                               ; preds = %34
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load i64, ptr %57, align 8, !tbaa !18
  store i64 %58, ptr %9, align 8, !tbaa !18
  br label %70

59:                                               ; preds = %34
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load i64, ptr %60, align 8, !tbaa !18
  store i64 %61, ptr %9, align 8, !tbaa !18
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.P4::hexvec", ptr %62, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !20
  %65 = mul i64 8, %64
  %66 = shl i64 -1, %65
  %67 = xor i64 %66, -1
  %68 = load i64, ptr %9, align 8, !tbaa !18
  %69 = and i64 %68, %67
  store i64 %69, ptr %9, align 8, !tbaa !18
  br label %70

70:                                               ; preds = %59, %56, %52, %48, %44
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @_ZSt3hexRSt8ios_base)
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.P4::hexvec", ptr %73, i32 0, i32 3
  %75 = load i32, ptr %74, align 8, !tbaa !24
  %76 = call i32 @_ZSt4setwi(i32 noundef %75)
  %77 = getelementptr inbounds %"struct.std::_Setw", ptr %10, i32 0, i32 0
  store i32 %76, ptr %77, align 4
  %78 = getelementptr inbounds %"struct.std::_Setw", ptr %10, i32 0, i32 0
  %79 = load i32, ptr %78, align 4
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %72, i32 %79)
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.P4::hexvec", ptr %81, i32 0, i32 4
  %83 = load i8, ptr %82, align 4, !tbaa !25
  %84 = call i8 @_ZSt7setfillIcESt8_SetfillIT_ES1_(i8 noundef signext %83)
  %85 = getelementptr inbounds %"struct.std::_Setfill", ptr %11, i32 0, i32 0
  store i8 %84, ptr %85, align 1
  %86 = getelementptr inbounds %"struct.std::_Setfill", ptr %11, i32 0, i32 0
  %87 = load i8, ptr %86, align 1
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E(ptr noundef nonnull align 8 dereferenceable(8) %80, i8 %87)
  %89 = load i64, ptr %9, align 8, !tbaa !18
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %88, i64 noundef %89)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %91

91:                                               ; preds = %70
  %92 = load i64, ptr %8, align 8, !tbaa !18
  %93 = add i64 %92, 1
  store i64 %93, ptr %8, align 8, !tbaa !18
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.P4::hexvec", ptr %94, i32 0, i32 1
  %96 = load i64, ptr %95, align 8, !tbaa !20
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 %96
  store ptr %98, ptr %7, align 8, !tbaa !5
  br label %27, !llvm.loop !26

99:                                               ; preds = %33
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %100, i8 noundef signext 93)
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = load ptr, ptr %102, align 8, !tbaa !9
  %104 = getelementptr i8, ptr %103, i64 -24
  %105 = load i64, ptr %104, align 8
  %106 = getelementptr inbounds i8, ptr %102, i64 %105
  %107 = load i8, ptr %6, align 1, !tbaa !13
  %108 = call noundef signext i8 @_ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc(ptr noundef nonnull align 8 dereferenceable(264) %106, i8 noundef signext %107)
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr i8, ptr %110, i64 -24
  %112 = load i64, ptr %111, align 8
  %113 = getelementptr inbounds i8, ptr %109, i64 %112
  %114 = load i32, ptr %5, align 4, !tbaa !11
  %115 = call noundef i32 @_ZNSt8ios_base5flagsESt13_Ios_Fmtflags(ptr noundef nonnull align 8 dereferenceable(216) %113, i32 noundef %114)
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret ptr %116
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 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)) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i8 @_ZSt7setfillIcESt8_SetfillIT_ES1_(i8 noundef signext) #4

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

; 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 signext i8 @_ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc(ptr noundef nonnull align 8 dereferenceable(264), i8 noundef signext) #0 align 2

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

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 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 #3 = { 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 #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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSSt13_Ios_Fmtflags", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN2P46hexvecE", !6, i64 0, !16, i64 8, !16, i64 16, !17, i64 24, !7, i64 28}
!16 = !{!"long", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!16, !16, i64 0}
!19 = !{!15, !16, i64 16}
!20 = !{!15, !16, i64 8}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!17, !17, i64 0}
!24 = !{!15, !17, i64 24}
!25 = !{!15, !7, i64 28}
!26 = distinct !{!26, !27}
!27 = !{!"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"

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN2P4lsERSoRKNS_6hexvecE(ptr noundef nonnull returned align 8 dereferenceable(8) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(29) %1) local_unnamed_addr #0 {
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 %5
  %7 = tail call noundef i32 @_ZNKSt8ios_base5flagsEv(ptr noundef nonnull align 8 dereferenceable(216) %6)
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 %10
  %12 = tail call noundef signext i8 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv(ptr noundef nonnull align 8 dereferenceable(264) %11)
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = load i64, ptr %13, align 8, !tbaa !8
  %.not32 = icmp eq i64 %14, 0
  br i1 %.not32, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %15 = load ptr, ptr %1, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = getelementptr inbounds i8, ptr %1, i64 24
  %18 = getelementptr inbounds i8, ptr %1, i64 28
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %0, i8 noundef signext 91)
  %20 = load i64, ptr %16, align 8, !tbaa !15
  switch i64 %20, label %32 [
    i64 1, label %29
    i64 2, label %26
    i64 4, label %23
    i64 8, label %21
  ]

21:                                               ; preds = %.lr.ph
  %22 = load i64, ptr %15, align 8, !tbaa !16
  br label %38

23:                                               ; preds = %.lr.ph
  %24 = load i32, ptr %15, align 4, !tbaa !17
  %25 = zext i32 %24 to i64
  br label %38

26:                                               ; preds = %.lr.ph
  %27 = load i16, ptr %15, align 2, !tbaa !18
  %28 = zext i16 %27 to i64
  br label %38

29:                                               ; preds = %.lr.ph
  %30 = load i8, ptr %15, align 1, !tbaa !20
  %31 = zext i8 %30 to i64
  br label %38

32:                                               ; preds = %.lr.ph
  %33 = load i64, ptr %15, align 8, !tbaa !16
  %34 = shl i64 %20, 3
  %35 = shl nsw i64 -1, %34
  %36 = xor i64 %35, -1
  %37 = and i64 %33, %36
  br label %38

38:                                               ; preds = %32, %29, %26, %23, %21
  %.029.peel = phi i64 [ %37, %32 ], [ %22, %21 ], [ %25, %23 ], [ %28, %26 ], [ %31, %29 ]
  %39 = 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)
  %40 = load i32, ptr %17, align 8, !tbaa !21
  %41 = tail call i32 @_ZSt4setwi(i32 noundef %40)
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 %41)
  %43 = load i8, ptr %18, align 4, !tbaa !22
  %44 = tail call i8 @_ZSt7setfillIcESt8_SetfillIT_ES1_(i8 noundef signext %43)
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E(ptr noundef nonnull align 8 dereferenceable(8) %42, i8 %44)
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %45, i64 noundef %.029.peel)
  %47 = load i64, ptr %13, align 8, !tbaa !8
  %48 = icmp ugt i64 %47, 1
  br i1 %48, label %.peel.next, label %._crit_edge

.peel.next:                                       ; preds = %38
  %49 = load i64, ptr %16, align 8, !tbaa !15
  %50 = getelementptr inbounds i8, ptr %15, i64 %49
  br label %62

._crit_edge:                                      ; preds = %82, %38, %2
  %51 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %0, i8 noundef signext 93)
  %52 = load ptr, ptr %0, align 8, !tbaa !5
  %53 = getelementptr i8, ptr %52, i64 -24
  %54 = load i64, ptr %53, align 8
  %55 = getelementptr inbounds i8, ptr %0, i64 %54
  %56 = tail call noundef signext i8 @_ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc(ptr noundef nonnull align 8 dereferenceable(264) %55, i8 noundef signext %12)
  %57 = load ptr, ptr %0, align 8, !tbaa !5
  %58 = getelementptr i8, ptr %57, i64 -24
  %59 = load i64, ptr %58, align 8
  %60 = getelementptr inbounds i8, ptr %0, i64 %59
  %61 = tail call noundef i32 @_ZNSt8ios_base5flagsESt13_Ios_Fmtflags(ptr noundef nonnull align 8 dereferenceable(216) %60, i32 noundef %7)
  ret ptr %0

62:                                               ; preds = %.peel.next, %82
  %.031 = phi ptr [ %50, %.peel.next ], [ %93, %82 ]
  %.02830 = phi i64 [ 1, %.peel.next ], [ %91, %82 ]
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %0, i8 noundef signext 32)
  %64 = load i64, ptr %16, align 8, !tbaa !15
  switch i64 %64, label %76 [
    i64 1, label %65
    i64 2, label %68
    i64 4, label %71
    i64 8, label %74
  ]

65:                                               ; preds = %62
  %66 = load i8, ptr %.031, align 1, !tbaa !20
  %67 = zext i8 %66 to i64
  br label %82

68:                                               ; preds = %62
  %69 = load i16, ptr %.031, align 2, !tbaa !18
  %70 = zext i16 %69 to i64
  br label %82

71:                                               ; preds = %62
  %72 = load i32, ptr %.031, align 4, !tbaa !17
  %73 = zext i32 %72 to i64
  br label %82

74:                                               ; preds = %62
  %75 = load i64, ptr %.031, align 8, !tbaa !16
  br label %82

76:                                               ; preds = %62
  %77 = load i64, ptr %.031, align 8, !tbaa !16
  %78 = shl i64 %64, 3
  %79 = shl nsw i64 -1, %78
  %80 = xor i64 %79, -1
  %81 = and i64 %77, %80
  br label %82

82:                                               ; preds = %76, %74, %71, %68, %65
  %.029 = phi i64 [ %81, %76 ], [ %75, %74 ], [ %73, %71 ], [ %70, %68 ], [ %67, %65 ]
  %83 = 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)
  %84 = load i32, ptr %17, align 8, !tbaa !21
  %85 = tail call i32 @_ZSt4setwi(i32 noundef %84)
  %86 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %83, i32 %85)
  %87 = load i8, ptr %18, align 4, !tbaa !22
  %88 = tail call i8 @_ZSt7setfillIcESt8_SetfillIT_ES1_(i8 noundef signext %87)
  %89 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E(ptr noundef nonnull align 8 dereferenceable(8) %86, i8 %88)
  %90 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %89, i64 noundef %.029)
  %91 = add nuw i64 %.02830, 1
  %92 = load i64, ptr %16, align 8, !tbaa !15
  %93 = getelementptr inbounds i8, ptr %.031, i64 %92
  %94 = load i64, ptr %13, align 8, !tbaa !8
  %95 = icmp ult i64 %91, %94
  br i1 %95, label %62, label %._crit_edge, !llvm.loop !23
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt8ios_base5flagsEv(ptr noundef nonnull align 8 dereferenceable(216)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress 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 #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 #0 align 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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i8 @_ZSt7setfillIcESt8_SetfillIT_ES1_(i8 noundef signext) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt8ios_base5flagsESt13_Ios_Fmtflags(ptr noundef nonnull align 8 dereferenceable(216), i32 noundef) local_unnamed_addr #1 align 2

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !12, i64 16}
!9 = !{!"_ZTSN2P46hexvecE", !10, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !11, i64 28}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"long", !11, i64 0}
!13 = !{!"int", !11, i64 0}
!14 = !{!9, !10, i64 0}
!15 = !{!9, !12, i64 8}
!16 = !{!12, !12, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"short", !11, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!9, !13, i64 24}
!22 = !{!9, !11, i64 28}
!23 = distinct !{!23, !24, !25}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.peeled.count", i32 1}


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