; LLVM IR from tensorflow/tflite-micro :: tensorflow/lite/micro/hexdump.ll (ZN6tflite7hexdumpENS_4SpanIKSt4byteEENS0_IcEE)

; 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.tflite::Span" = type { ptr, i64 }
%"class.tflite::Span.0" = type { ptr, i64 }
%"class.tflite::StaticVector" = type { %"struct.std::array", i64 }
%"struct.std::array" = type { [16 x i8] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local { ptr, i64 } @_ZN6tflite7hexdumpENS_4SpanIKSt4byteEENS0_IcEE(ptr %0, i64 %1, ptr %2, i64 %3) #0 {
  %5 = alloca %"class.tflite::Span", align 8
  %6 = alloca %"class.tflite::Span.0", align 8
  %7 = alloca %"class.tflite::Span", align 8
  %8 = alloca %"class.tflite::Span", align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.tflite::StaticVector", align 8
  %15 = alloca %"class.tflite::Span", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.tflite::Span", align 8
  %19 = alloca i8, align 1
  %20 = alloca %"class.tflite::Span", align 8
  %21 = alloca %"class.tflite::Span", align 8
  %22 = alloca %"class.tflite::Span", align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.tflite::Span", align 8
  %28 = alloca %"class.tflite::Span", align 8
  %29 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  store ptr %0, ptr %29, align 8
  %30 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  store i64 %1, ptr %30, align 8
  %31 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  store ptr %2, ptr %31, align 8
  %32 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  store i64 %3, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 16, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %33 = call noundef i64 @_ZNK6tflite4SpanIKSt4byteE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %34 = add i64 %33, 16
  %35 = sub i64 %34, 1
  %36 = udiv i64 %35, 16
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !12
  br label %38

38:                                               ; preds = %130, %4
  %39 = load i32, ptr %12, align 4, !tbaa !12
  %40 = load i32, ptr %11, align 4, !tbaa !12
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %133

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  call void @_ZN6tflite12StaticVectorIcLm16EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %44 = load i32, ptr %12, align 4, !tbaa !12
  %45 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str, i32 noundef %44)
  %46 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %47 = extractvalue { ptr, i64 } %45, 0
  store ptr %47, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %49 = extractvalue { ptr, i64 } %45, 1
  store i64 %49, ptr %48, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %50

50:                                               ; preds = %93, %43
  %51 = load i32, ptr %16, align 4, !tbaa !12
  %52 = icmp slt i32 %51, 16
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %96

54:                                               ; preds = %50
  %55 = load i64, ptr %9, align 8, !tbaa !10
  %56 = call noundef i64 @_ZNK6tflite4SpanIKSt4byteE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %58, label %77

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %59 = load i64, ptr %9, align 8, !tbaa !10
  %60 = add i64 %59, 1
  store i64 %60, ptr %9, align 8, !tbaa !10
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6tflite4SpanIKSt4byteEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %59) #5
  %62 = load i8, ptr %61, align 1, !tbaa !14
  %63 = zext i8 %62 to i32
  store i32 %63, ptr %17, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %64 = load i32, ptr %17, align 4, !tbaa !12
  %65 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.1, i32 noundef %64)
  %66 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %67 = extractvalue { ptr, i64 } %65, 0
  store ptr %67, ptr %66, align 8
  %68 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %69 = extractvalue { ptr, i64 } %65, 1
  store i64 %69, ptr %68, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 46, ptr %19, align 1, !tbaa !14
  %70 = load i32, ptr %17, align 4, !tbaa !12
  %71 = call i32 @isprint(i32 noundef %70) #6
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %58
  %74 = load i32, ptr %17, align 4, !tbaa !12
  %75 = trunc i32 %74 to i8
  store i8 %75, ptr %19, align 1, !tbaa !14
  br label %76

76:                                               ; preds = %73, %58
  call void @_ZN6tflite12StaticVectorIcLm16EE9push_backERKc(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 1 dereferenceable(1) %19)
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %83

77:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %78 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.2)
  %79 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %80 = extractvalue { ptr, i64 } %78, 0
  store ptr %80, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %82 = extractvalue { ptr, i64 } %78, 1
  store i64 %82, ptr %81, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %83

83:                                               ; preds = %77, %76
  %84 = load i32, ptr %16, align 4, !tbaa !12
  %85 = icmp eq i32 %84, 7
  br i1 %85, label %86, label %92

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %87 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.3)
  %88 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %89 = extractvalue { ptr, i64 } %87, 0
  store ptr %89, ptr %88, align 8
  %90 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %91 = extractvalue { ptr, i64 } %87, 1
  store i64 %91, ptr %90, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %92

92:                                               ; preds = %86, %83
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %16, align 4, !tbaa !12
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %16, align 4, !tbaa !12
  br label %50, !llvm.loop !15

96:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %97 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.4)
  %98 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %99 = extractvalue { ptr, i64 } %97, 0
  store ptr %99, ptr %98, align 8
  %100 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %101 = extractvalue { ptr, i64 } %97, 1
  store i64 %101, ptr %100, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store ptr %14, ptr %23, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %102 = load ptr, ptr %23, align 8, !tbaa !6
  %103 = call noundef ptr @_ZN6tflite12StaticVectorIcLm16EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102)
  store ptr %103, ptr %24, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %104 = load ptr, ptr %23, align 8, !tbaa !6
  %105 = call noundef ptr @_ZN6tflite12StaticVectorIcLm16EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %104)
  store ptr %105, ptr %25, align 8, !tbaa !6
  br label %106

106:                                              ; preds = %121, %96
  %107 = load ptr, ptr %24, align 8, !tbaa !6
  %108 = load ptr, ptr %25, align 8, !tbaa !6
  %109 = icmp ne ptr %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %124

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %112 = load ptr, ptr %24, align 8, !tbaa !6
  store ptr %112, ptr %26, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  %113 = load ptr, ptr %26, align 8, !tbaa !6
  %114 = load i8, ptr %113, align 1, !tbaa !14
  %115 = sext i8 %114 to i32
  %116 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.5, i32 noundef %115)
  %117 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %118 = extractvalue { ptr, i64 } %116, 0
  store ptr %118, ptr %117, align 8
  %119 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %120 = extractvalue { ptr, i64 } %116, 1
  store i64 %120, ptr %119, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %121

121:                                              ; preds = %111
  %122 = load ptr, ptr %24, align 8, !tbaa !6
  %123 = getelementptr inbounds i8, ptr %122, i32 1
  store ptr %123, ptr %24, align 8, !tbaa !6
  br label %106

124:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %125 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.5, i32 noundef 10)
  %126 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 0
  %127 = extractvalue { ptr, i64 } %125, 0
  store ptr %127, ptr %126, align 8
  %128 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 1
  %129 = extractvalue { ptr, i64 } %125, 1
  store i64 %129, ptr %128, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  br label %130

130:                                              ; preds = %124
  %131 = load i32, ptr %12, align 4, !tbaa !12
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !12
  br label %38, !llvm.loop !17

133:                                              ; preds = %42
  %134 = call noundef ptr @_ZNK6tflite4SpanIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  %135 = call noundef i64 @_ZNK6tflite4SpanIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  %136 = call noundef i64 @_ZNK6tflite4SpanIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  %137 = sub i64 %135, %136
  call void @_ZN6tflite4SpanIcEC2EPcm(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %134, i64 noundef %137) #5
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  %138 = load { ptr, i64 }, ptr %5, align 8
  ret { ptr, i64 } %138
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden { ptr, i64 } @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ...) #0

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isprint(i32 noundef) #4

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite4SpanIcEC2EPcm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) unnamed_addr #3 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind willreturn memory(read) "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 }
attributes #6 = { nounwind willreturn memory(read) }

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


; 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.tflite::Span" = type { ptr, i64 }
%"class.tflite::Span.0" = type { ptr, i64 }
%"class.tflite::StaticVector" = type { %"struct.std::array", i64 }
%"struct.std::array" = type { [16 x i8] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local { ptr, i64 } @_ZN6tflite7hexdumpENS_4SpanIKSt4byteEENS0_IcEE(ptr %0, i64 %1, ptr %2, i64 %3) local_unnamed_addr #0 {
  %5 = alloca %"class.tflite::Span", align 8
  %6 = alloca %"class.tflite::Span.0", align 8
  %7 = alloca %"class.tflite::Span", align 8
  %8 = alloca %"class.tflite::Span", align 8
  %9 = alloca %"class.tflite::StaticVector", align 8
  %10 = alloca i8, align 1
  store ptr %0, ptr %6, align 8
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %1, ptr %11, align 8
  store ptr %2, ptr %7, align 8
  %12 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %3, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !5
  %13 = call noundef i64 @_ZNK6tflite4SpanIKSt4byteE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %14 = add i64 %13, 15
  %15 = lshr i64 %14, 4
  %16 = trunc i64 %15 to i32
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %4
  %.sroa.423.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  br label %22

._crit_edge42:                                    ; preds = %._crit_edge, %4
  %18 = call noundef ptr @_ZNK6tflite4SpanIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  %19 = call noundef i64 @_ZNK6tflite4SpanIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  %20 = call noundef i64 @_ZNK6tflite4SpanIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  %21 = sub i64 %19, %20
  call void @_ZN6tflite4SpanIcEC2EPcm(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %18, i64 noundef %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  %.fca.0.load = load ptr, ptr %5, align 8
  %.fca.0.insert = insertvalue { ptr, i64 } poison, ptr %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %5, i64 8
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { ptr, i64 } %.fca.0.insert, i64 %.fca.1.load, 1
  ret { ptr, i64 } %.fca.1.insert

22:                                               ; preds = %.lr.ph41, %._crit_edge
  %.039 = phi i64 [ 0, %.lr.ph41 ], [ %.2, %._crit_edge ]
  %.03038 = phi i32 [ 0, %.lr.ph41 ], [ %59, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZN6tflite12StaticVectorIcLm16EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %23 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str, i32 noundef %.03038)
  %24 = extractvalue { ptr, i64 } %23, 0
  %25 = extractvalue { ptr, i64 } %23, 1
  store ptr %24, ptr %8, align 8, !tbaa !6
  store i64 %25, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  br label %32

26:                                               ; preds = %54
  %27 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.4)
  %28 = extractvalue { ptr, i64 } %27, 0
  %29 = extractvalue { ptr, i64 } %27, 1
  store ptr %28, ptr %8, align 8, !tbaa !6
  store i64 %29, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  %30 = call noundef ptr @_ZN6tflite12StaticVectorIcLm16EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %31 = call noundef ptr @_ZN6tflite12StaticVectorIcLm16EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %.not36 = icmp eq ptr %30, %31
  br i1 %.not36, label %._crit_edge, label %.lr.ph

32:                                               ; preds = %22, %54
  %.135 = phi i64 [ %.039, %22 ], [ %.2, %54 ]
  %.03134 = phi i32 [ 0, %22 ], [ %55, %54 ]
  %33 = call noundef i64 @_ZNK6tflite4SpanIKSt4byteE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %34 = icmp ult i64 %.135, %33
  br i1 %34, label %35, label %44

35:                                               ; preds = %32
  %36 = add nuw i64 %.135, 1
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6tflite4SpanIKSt4byteEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %.135) #5
  %38 = load i8, ptr %37, align 1, !tbaa !12
  %39 = zext i8 %38 to i32
  %40 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.1, i32 noundef %39)
  %41 = extractvalue { ptr, i64 } %40, 0
  %42 = extractvalue { ptr, i64 } %40, 1
  store ptr %41, ptr %8, align 8, !tbaa !6
  store i64 %42, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  store i8 46, ptr %10, align 1, !tbaa !12
  %43 = call i32 @isprint(i32 noundef %39) #6
  %.not33 = icmp eq i32 %43, 0
  %spec.store.select = select i1 %.not33, i8 46, i8 %38
  store i8 %spec.store.select, ptr %10, align 1
  call void @_ZN6tflite12StaticVectorIcLm16EE9push_backERKc(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  br label %48

44:                                               ; preds = %32
  %45 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.2)
  %46 = extractvalue { ptr, i64 } %45, 0
  %47 = extractvalue { ptr, i64 } %45, 1
  store ptr %46, ptr %8, align 8, !tbaa !6
  store i64 %47, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  br label %48

48:                                               ; preds = %44, %35
  %.2 = phi i64 [ %36, %35 ], [ %.135, %44 ]
  %49 = icmp eq i32 %.03134, 7
  br i1 %49, label %50, label %54

50:                                               ; preds = %48
  %51 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.3)
  %52 = extractvalue { ptr, i64 } %51, 0
  %53 = extractvalue { ptr, i64 } %51, 1
  store ptr %52, ptr %8, align 8, !tbaa !6
  store i64 %53, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  br label %54

54:                                               ; preds = %48, %50
  %55 = add nuw nsw i32 %.03134, 1
  %exitcond.not = icmp eq i32 %55, 16
  br i1 %exitcond.not, label %26, label %32, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %26
  %56 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.5, i32 noundef 10)
  %57 = extractvalue { ptr, i64 } %56, 0
  %58 = extractvalue { ptr, i64 } %56, 1
  store ptr %57, ptr %8, align 8, !tbaa !6
  store i64 %58, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  %59 = add nuw nsw i32 %.03038, 1
  %exitcond43.not = icmp eq i32 %59, %16
  br i1 %exitcond43.not, label %._crit_edge42, label %22, !llvm.loop !15

.lr.ph:                                           ; preds = %26, %.lr.ph
  %.03237 = phi ptr [ %65, %.lr.ph ], [ %30, %26 ]
  %60 = load i8, ptr %.03237, align 1, !tbaa !12
  %61 = sext i8 %60 to i32
  %62 = call { ptr, i64 } (ptr, ptr, ...) @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.5, i32 noundef %61)
  %63 = extractvalue { ptr, i64 } %62, 0
  %64 = extractvalue { ptr, i64 } %62, 1
  store ptr %63, ptr %8, align 8, !tbaa !6
  store i64 %64, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !10
  %65 = getelementptr inbounds i8, ptr %.03237, i64 1
  %.not = icmp eq ptr %65, %31
  br i1 %.not, label %._crit_edge, label %.lr.ph
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden { ptr, i64 } @_ZN12_GLOBAL__N_16outputERKN6tflite4SpanIcEEPKcz(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ...) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isprint(i32 noundef) local_unnamed_addr #4

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite4SpanIcEC2EPcm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) unnamed_addr #3 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 nofree nounwind willreturn memory(read) "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 }
attributes #6 = { nounwind willreturn memory(read) }

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


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