; LLVM IR from p4lang/p4c :: backends/tofino/bf-asm/json.ll (ZNK4json3map8print_onERSoiiPKc)

; 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::_List_const_iterator" = type { ptr }
%"struct.std::_Setw" = type { i32 }
%"struct.std::pair" = type { ptr, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }

@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = 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

; 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: 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) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4json3map8print_onERSoiiPKc(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) unnamed_addr #4 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.std::_List_const_iterator", align 8
  %16 = alloca %"struct.std::_List_const_iterator", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.std::_Setw", align 4
  %19 = alloca %"struct.std::_Setw", align 4
  %20 = alloca %"struct.std::_Setw", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %22 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %22, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 1, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  %23 = load ptr, ptr %21, align 8, !tbaa !13
  %24 = getelementptr inbounds ptr, ptr %23, i64 9
  %25 = load ptr, ptr %24, align 8
  %26 = call noundef zeroext i1 %25(ptr noundef nonnull align 8 dereferenceable(80) %21, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %27 = zext i1 %26 to i8
  store i8 %27, ptr %13, align 1, !tbaa !11
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %28, i8 noundef signext 123)
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = add nsw i32 %30, 2
  store i32 %31, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr %21, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = call ptr @_ZNK2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %33) #5
  %35 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %15, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = call ptr @_ZNK2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %37) #5
  %39 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %16, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  br label %40

40:                                               ; preds = %104, %5
  %41 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  br i1 %41, label %43, label %42

42:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %106

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  store ptr %44, ptr %17, align 8, !tbaa !5
  %45 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %46 = trunc i8 %45 to i1
  br i1 %46, label %50, label %47

47:                                               ; preds = %43
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %48, i8 noundef signext 44)
  br label %50

50:                                               ; preds = %47, %43
  %51 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %52 = trunc i8 %51 to i1
  br i1 %52, label %64, label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %54, i8 noundef signext 10)
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef %56)
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = call i32 @_ZSt4setwi(i32 noundef %58)
  %60 = getelementptr inbounds %"struct.std::_Setw", ptr %18, i32 0, i32 0
  store i32 %59, ptr %60, align 4
  %61 = getelementptr inbounds %"struct.std::_Setw", ptr %18, i32 0, i32 0
  %62 = load i32, ptr %61, align 4
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %57, i32 %62)
  br label %64

64:                                               ; preds = %53, %50
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %65, i8 noundef signext 32)
  %67 = call i32 @_ZSt4setwi(i32 noundef 0)
  %68 = getelementptr inbounds %"struct.std::_Setw", ptr %19, i32 0, i32 0
  store i32 %67, ptr %68, align 4
  %69 = getelementptr inbounds %"struct.std::_Setw", ptr %19, i32 0, i32 0
  %70 = load i32, ptr %69, align 4
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %66, i32 %70)
  %72 = load ptr, ptr %17, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.std::pair", ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 2
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %74, align 8, !tbaa !13
  %81 = getelementptr inbounds ptr, ptr %80, i64 8
  %82 = load ptr, ptr %81, align 8
  call void %82(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 8 dereferenceable(8) %75, i32 noundef %76, i32 noundef %78, ptr noundef %79)
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str.13)
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.std::pair", ptr %85, i32 0, i32 1
  %87 = call noundef zeroext i1 @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %86) #5
  br i1 %87, label %88, label %100

88:                                               ; preds = %64
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.std::pair", ptr %89, i32 0, i32 1
  %91 = call noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %90) #5
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = sub nsw i32 %94, 2
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = load ptr, ptr %91, align 8, !tbaa !13
  %98 = getelementptr inbounds ptr, ptr %97, i64 8
  %99 = load ptr, ptr %98, align 8
  call void %99(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 8 dereferenceable(8) %92, i32 noundef %93, i32 noundef %95, ptr noundef %96)
  br label %103

100:                                              ; preds = %64
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %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.9)
  br label %103

103:                                              ; preds = %100, %88
  store i8 0, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %104

104:                                              ; preds = %103
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %40

106:                                              ; preds = %42
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = sub nsw i32 %107, 2
  store i32 %108, ptr %8, align 4, !tbaa !9
  %109 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %110 = trunc i8 %109 to i1
  br i1 %110, label %118, label %111

111:                                              ; preds = %106
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %114 = trunc i8 %113 to i1
  %115 = zext i1 %114 to i64
  %116 = select i1 %114, i8 32, i8 10
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %112, i8 noundef signext %116)
  br label %118

118:                                              ; preds = %111, %106
  %119 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %120 = trunc i8 %119 to i1
  br i1 %120, label %130, label %121

121:                                              ; preds = %118
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  %125 = call i32 @_ZSt4setwi(i32 noundef %124)
  %126 = getelementptr inbounds %"struct.std::_Setw", ptr %20, i32 0, i32 0
  store i32 %125, ptr %126, align 4
  %127 = getelementptr inbounds %"struct.std::_Setw", ptr %20, i32 0, i32 0
  %128 = load i32, ptr %127, align 4
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 %128)
  br label %130

130:                                              ; preds = %121, %118
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %131, i8 noundef signext 125)
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIKPN4json3objESt10unique_ptrIS1_St14default_deleteIS1_EEE", !6, i64 0, !19, i64 8}
!19 = !{!"_ZTSSt10unique_ptrIN4json3objESt14default_deleteIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt15__uniq_ptr_dataIN4json3objESt14default_deleteIS1_ELb1ELb1EE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_implIN4json3objESt14default_deleteIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt5tupleIJPN4json3objESt14default_deleteIS1_EEE", !23, i64 0}
!23 = !{!"_ZTSSt11_Tuple_implILm0EJPN4json3objESt14default_deleteIS1_EEE", !24, i64 0}
!24 = !{!"_ZTSSt10_Head_baseILm0EPN4json3objELb0EE", !6, i64 0}


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

%"struct.std::_List_const_iterator" = type { ptr }

@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = 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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4json3map8print_onERSoiiPKc(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) unnamed_addr #4 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_List_const_iterator", align 8
  %8 = alloca %"struct.std::_List_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 %3, ptr %6, align 4, !tbaa !5
  %9 = load ptr, ptr %0, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %9, i64 72
  %11 = load ptr, ptr %10, align 8
  %12 = call noundef zeroext i1 %11(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 123)
  %14 = add nsw i32 %2, 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = call ptr @_ZNK2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %15) #5
  store ptr %16, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %17 = call ptr @_ZNK2P411ordered_mapIPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EENS2_7ptrlessESaISt4pairIKS3_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %15) #5
  store ptr %17, ptr %8, align 8
  %18 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %18, label %19, label %.critedge

19:                                               ; preds = %5
  %20 = add nsw i32 %3, -2
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %12, label %27, label %22

22:                                               ; preds = %19
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 10)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %4)
  %25 = call i32 @_ZSt4setwi(i32 noundef %14)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 %25)
  br label %27

27:                                               ; preds = %22, %19
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 32)
  %29 = call i32 @_ZSt4setwi(i32 noundef 0)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 %29)
  %31 = load ptr, ptr %21, align 8, !tbaa !11
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %32, i64 64
  %34 = load ptr, ptr %33, align 8
  call void %34(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %14, i32 noundef %20, ptr noundef %4)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.13)
  %36 = getelementptr inbounds i8, ptr %21, i64 8
  %37 = call noundef zeroext i1 @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #5
  br i1 %37, label %40, label %38

38:                                               ; preds = %27
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.9)
  br label %45

40:                                               ; preds = %27
  %41 = call noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #5
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %42, i64 64
  %44 = load ptr, ptr %43, align 8
  call void %44(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %14, i32 noundef %20, ptr noundef %4)
  br label %45

45:                                               ; preds = %40, %38
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %47 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %47, label %.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %75, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %48 = select i1 %12, i8 32, i8 10
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext %48)
  br label %78

.peel.next:                                       ; preds = %45, %75
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 44)
  br i1 %12, label %57, label %52

52:                                               ; preds = %.peel.next
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 10)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef %4)
  %55 = call i32 @_ZSt4setwi(i32 noundef %14)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %54, i32 %55)
  br label %57

57:                                               ; preds = %52, %.peel.next
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 32)
  %59 = call i32 @_ZSt4setwi(i32 noundef 0)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %58, i32 %59)
  %61 = load ptr, ptr %50, align 8, !tbaa !11
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 64
  %64 = load ptr, ptr %63, align 8
  call void %64(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %14, i32 noundef %20, ptr noundef %4)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.13)
  %66 = getelementptr inbounds i8, ptr %50, i64 8
  %67 = call noundef zeroext i1 @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #5
  br i1 %67, label %68, label %73

68:                                               ; preds = %57
  %69 = call noundef ptr @_ZNKSt10unique_ptrIN4json3objESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #5
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i64 64
  %72 = load ptr, ptr %71, align 8
  call void %72(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %14, i32 noundef %20, ptr noundef %4)
  br label %75

73:                                               ; preds = %57
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.9)
  br label %75

75:                                               ; preds = %73, %68
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %77 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %77, label %.peel.next, label %._crit_edge, !llvm.loop !20

.critedge:                                        ; preds = %5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %78

78:                                               ; preds = %.critedge, %._crit_edge
  br i1 %12, label %83, label %79

79:                                               ; preds = %78
  %80 = add nsw i32 %2, 1
  %81 = call i32 @_ZSt4setwi(i32 noundef %80)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 %81)
  br label %83

83:                                               ; preds = %79, %78
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %1, i8 noundef signext 125)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorISt4pairIKPN4json3objESt10unique_ptrIS2_St14default_deleteIS2_EEEESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress 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 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = !{!"int", !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, !13, i64 0}
!12 = !{!"_ZTSSt4pairIKPN4json3objESt10unique_ptrIS1_St14default_deleteIS1_EEE", !13, i64 0, !14, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTSSt10unique_ptrIN4json3objESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_dataIN4json3objESt14default_deleteIS1_ELb1ELb1EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_implIN4json3objESt14default_deleteIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt5tupleIJPN4json3objESt14default_deleteIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSSt11_Tuple_implILm0EJPN4json3objESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm0EPN4json3objELb0EE", !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.peeled.count", i32 1}


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