; LLVM IR from chensoft/libsocket :: lib/libchen/src/data (json)

; 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.chen::json" = type { i32, %"union.chen::json::Data" }
%"union.chen::json::Data" = type { ptr }

; 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 nounwind uwtable
declare dso_local void @_ZN4chen4jsonC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4chen4json6decodeERS0_RKNS_8iterator7erasureISt18input_iterator_tagKhS5_PS5_lEERS7_SA_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4chen4json6decodeERSt6vectorIS0_SaIS0_EERKNS_8iterator7erasureISt18input_iterator_tagKhS8_PS8_lEERSA_SD_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.chen::json", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEeqERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  br i1 %15, label %21, label %16

16:                                               ; preds = %4
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = call noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = zext i8 %18 to i32
  %20 = icmp ne i32 %19, 91
  br i1 %20, label %21, label %25

21:                                               ; preds = %16, %4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %25

25:                                               ; preds = %21, %16
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27)
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZN4chen4json7advanceERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_b(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29, i1 noundef zeroext true)
  br label %31

31:                                               ; preds = %98, %25
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEneERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33)
  br i1 %34, label %35, label %99

35:                                               ; preds = %31
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = call noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
  %38 = zext i8 %37 to i32
  %39 = icmp eq i32 %38, 93
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  br label %99

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  call void @_ZN4chen4jsonC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #3
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN4chen4json6decodeERS0_RKNS_8iterator7erasureISt18input_iterator_tagKhS5_PS5_lEERS7_SA_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %45 unwind label %77

45:                                               ; preds = %41
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4chen4jsonESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %48 unwind label %77

48:                                               ; preds = %45
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = invoke noundef zeroext i1 @_ZN4chen4json7advanceERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_b(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %51, i1 noundef zeroext true)
          to label %53 unwind label %77

53:                                               ; preds = %48
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = invoke noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %56 unwind label %77

56:                                               ; preds = %53
  %57 = zext i8 %55 to i32
  %58 = icmp eq i32 %57, 44
  br i1 %58, label %59, label %82

59:                                               ; preds = %56
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEppEv(ptr noundef nonnull align 8 dereferenceable(8) %61)
          to label %63 unwind label %77

63:                                               ; preds = %59
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = invoke noundef zeroext i1 @_ZN4chen4json7advanceERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_b(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull align 8 dereferenceable(8) %64, i1 noundef zeroext true)
          to label %66 unwind label %77

66:                                               ; preds = %63
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = invoke noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %67)
          to label %69 unwind label %77

69:                                               ; preds = %66
  %70 = zext i8 %68 to i32
  %71 = icmp eq i32 %70, 93
  br i1 %71, label %72, label %81

72:                                               ; preds = %69
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 8 dereferenceable(8) %75)
          to label %76 unwind label %77

76:                                               ; preds = %72
  br label %81

77:                                               ; preds = %89, %82, %72, %66, %63, %59, %53, %48, %45, %41
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %10, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %11, align 4
  call void @_ZN4chen4jsonD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  br label %110

81:                                               ; preds = %76, %69
  br label %95

82:                                               ; preds = %56
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = invoke noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %83)
          to label %85 unwind label %77

85:                                               ; preds = %82
  %86 = zext i8 %84 to i32
  %87 = icmp eq i32 %86, 93
  br i1 %87, label %88, label %89

88:                                               ; preds = %85
  store i32 3, ptr %12, align 4
  br label %96

89:                                               ; preds = %85
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 8 dereferenceable(8) %92)
          to label %93 unwind label %77

93:                                               ; preds = %89
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94, %81
  store i32 0, ptr %12, align 4
  br label %96

96:                                               ; preds = %95, %88
  call void @_ZN4chen4jsonD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  %97 = load i32, ptr %12, align 4
  switch i32 %97, label %115 [
    i32 0, label %98
    i32 3, label %99
  ]

98:                                               ; preds = %96
  br label %31, !llvm.loop !9

99:                                               ; preds = %96, %40, %31
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEeqERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull align 8 dereferenceable(8) %101)
  br i1 %102, label %103, label %107

103:                                              ; preds = %99
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull align 8 dereferenceable(8) %106)
  br label %107

107:                                              ; preds = %103, %99
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEppEv(ptr noundef nonnull align 8 dereferenceable(8) %108)
  ret void

110:                                              ; preds = %77
  %111 = load ptr, ptr %10, align 8
  %112 = load i32, ptr %11, align 4
  %113 = insertvalue { ptr, i32 } poison, ptr %111, 0
  %114 = insertvalue { ptr, i32 } %113, i32 %112, 1
  resume { ptr, i32 } %114

115:                                              ; preds = %96
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4chen4jsonESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

declare void @_ZN4chen4jsonD1Ev(ptr)

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

%"class.chen::json" = type { i32, %"union.chen::json::Data" }
%"union.chen::json::Data" = type { ptr }

; 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 nounwind uwtable
declare dso_local void @_ZN4chen4jsonC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4chen4json6decodeERS0_RKNS_8iterator7erasureISt18input_iterator_tagKhS5_PS5_lEERS7_SA_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4chen4json6decodeERSt6vectorIS0_SaIS0_EERKNS_8iterator7erasureISt18input_iterator_tagKhS8_PS8_lEERSA_SD_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.chen::json", align 8
  %6 = tail call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEeqERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %6, label %9, label %7

7:                                                ; preds = %4
  %8 = tail call noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.not = icmp eq i8 %8, 91
  br i1 %.not, label %10, label %9

9:                                                ; preds = %7, %4
  tail call void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %10

10:                                               ; preds = %9, %7
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %12 = tail call noundef zeroext i1 @_ZN4chen4json7advanceERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_b(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %3, i1 noundef zeroext true)
  %13 = tail call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEneERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %13, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %10, %39
  %14 = call noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %15 = icmp eq i8 %14, 93
  br i1 %15, label %.loopexit, label %16

16:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  call void @_ZN4chen4jsonC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  invoke void @_ZN4chen4json6decodeERS0_RKNS_8iterator7erasureISt18input_iterator_tagKhS5_PS5_lEERS7_SA_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %17 unwind label %33

17:                                               ; preds = %16
  %18 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4chen4jsonESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %19 unwind label %33

19:                                               ; preds = %17
  %20 = invoke noundef zeroext i1 @_ZN4chen4json7advanceERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_b(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, i1 noundef zeroext true)
          to label %21 unwind label %33

21:                                               ; preds = %19
  %22 = invoke noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %23 unwind label %33

23:                                               ; preds = %21
  %24 = icmp eq i8 %22, 44
  br i1 %24, label %25, label %35

25:                                               ; preds = %23
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %27 unwind label %33

27:                                               ; preds = %25
  %28 = invoke noundef zeroext i1 @_ZN4chen4json7advanceERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_b(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %3, i1 noundef zeroext true)
          to label %29 unwind label %33

29:                                               ; preds = %27
  %30 = invoke noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %31 unwind label %33

31:                                               ; preds = %29
  %32 = icmp eq i8 %30, 93
  br i1 %32, label %.invoke, label %39

33:                                               ; preds = %.invoke, %35, %29, %27, %25, %21, %19, %17, %16
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4chen4jsonD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  resume { ptr, i32 } %34

35:                                               ; preds = %23
  %36 = invoke noundef zeroext i8 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %37 unwind label %33

37:                                               ; preds = %35
  %38 = icmp eq i8 %36, 93
  br i1 %38, label %.thread, label %.invoke

.thread:                                          ; preds = %37
  call void @_ZN4chen4jsonD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %.loopexit

.invoke:                                          ; preds = %31, %37
  invoke void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %39 unwind label %33

39:                                               ; preds = %.invoke, %31
  call void @_ZN4chen4jsonD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %40 = call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEneERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %40, label %.lr.ph, label %.loopexit

.loopexit:                                        ; preds = %39, %.lr.ph, %10, %.thread
  %41 = call noundef zeroext i1 @_ZNK4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEeqERKS5_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %41, label %42, label %43

42:                                               ; preds = %.loopexit
  call void @_ZN4chen4json9exceptionERKNS_8iterator7erasureISt18input_iterator_tagKhS4_PS4_lEERS6_S9_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %43

43:                                               ; preds = %42, %.loopexit
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4chen8iterator7erasureISt18input_iterator_tagKhS3_PS3_lEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4chen4jsonESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

declare void @_ZN4chen4jsonD1Ev(ptr) local_unnamed_addr

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass