; LLVM IR from team-charls/charls :: src (jpeg_stream_writer)

; 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.charls_frame_info = type { i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info = external hidden unnamed_addr constant [82 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6charls18jpeg_stream_writer20write_segment_headerENS_16jpeg_marker_codeEm(ptr noundef nonnull align 8 dereferenceable(56), i8 noundef zeroext, i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(16) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.charls_frame_info, ptr %9, i32 0, i32 0
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = icmp ugt i32 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %2
  br label %16

14:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 85, ptr noundef @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #4
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.charls_frame_info, ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 4, !tbaa !12
  %20 = icmp ugt i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %16
  br label %24

22:                                               ; preds = %16
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #4
  unreachable

23:                                               ; No predecessors!
  br label %24

24:                                               ; preds = %23, %21
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.charls_frame_info, ptr %25, i32 0, i32 2
  %27 = load i32, ptr %26, align 4, !tbaa !13
  %28 = icmp sge i32 %27, 2
  br i1 %28, label %29, label %34

29:                                               ; preds = %24
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.charls_frame_info, ptr %30, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !13
  %33 = icmp sle i32 %32, 16
  br label %34

34:                                               ; preds = %29, %24
  %35 = phi i1 [ false, %24 ], [ %33, %29 ]
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  br label %39

37:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #4
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.charls_frame_info, ptr %40, i32 0, i32 3
  %42 = load i32, ptr %41, align 4, !tbaa !14
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.charls_frame_info, ptr %45, i32 0, i32 3
  %47 = load i32, ptr %46, align 4, !tbaa !14
  %48 = call noundef zeroext i8 @_ZNSt14numeric_limitsIhE3maxEv() #5
  %49 = zext i8 %48 to i32
  %50 = icmp sle i32 %47, %49
  br label %51

51:                                               ; preds = %44, %39
  %52 = phi i1 [ false, %39 ], [ %50, %44 ]
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  br label %56

54:                                               ; preds = %51
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 88, ptr noundef @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #4
  unreachable

55:                                               ; No predecessors!
  br label %56

56:                                               ; preds = %55, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.charls_frame_info, ptr %57, i32 0, i32 3
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = sext i32 %59 to i64
  %61 = mul i64 %60, 3
  %62 = add i64 6, %61
  store i64 %62, ptr %5, align 8, !tbaa !15
  %63 = load i64, ptr %5, align 8, !tbaa !15
  call void @_ZN6charls18jpeg_stream_writer20write_segment_headerENS_16jpeg_marker_codeEm(ptr noundef nonnull align 8 dereferenceable(56) %8, i8 noundef zeroext -9, i64 noundef %63)
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.charls_frame_info, ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 4, !tbaa !13
  call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %66) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.charls_frame_info, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = call noundef zeroext i16 @_ZNSt14numeric_limitsItE3maxEv() #5
  %71 = zext i16 %70 to i32
  %72 = icmp ugt i32 %69, %71
  br i1 %72, label %80, label %73

73:                                               ; preds = %56
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.charls_frame_info, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !12
  %77 = call noundef zeroext i16 @_ZNSt14numeric_limitsItE3maxEv() #5
  %78 = zext i16 %77 to i32
  %79 = icmp ugt i32 %76, %78
  br label %80

80:                                               ; preds = %73, %56
  %81 = phi i1 [ true, %56 ], [ %79, %73 ]
  %82 = zext i1 %81 to i8
  store i8 %82, ptr %6, align 1, !tbaa !17
  %83 = load i8, ptr %6, align 1, !tbaa !17, !range !19, !noundef !20
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %86

85:                                               ; preds = %80
  br label %90

86:                                               ; preds = %80
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.charls_frame_info, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !12
  br label %90

90:                                               ; preds = %86, %85
  %91 = phi i32 [ 0, %85 ], [ %89, %86 ]
  call void @_ZN6charls18jpeg_stream_writer12write_uint16Ej(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %91) #5
  %92 = load i8, ptr %6, align 1, !tbaa !17, !range !19, !noundef !20
  %93 = trunc i8 %92 to i1
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  br label %99

95:                                               ; preds = %90
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.charls_frame_info, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %95, %94
  %100 = phi i32 [ 0, %94 ], [ %98, %95 ]
  call void @_ZN6charls18jpeg_stream_writer12write_uint16Ej(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %100) #5
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.charls_frame_info, ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 4, !tbaa !14
  call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %103) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !21
  br label %104

104:                                              ; preds = %113, %99
  %105 = load i32, ptr %7, align 4, !tbaa !21
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.charls_frame_info, ptr %106, i32 0, i32 3
  %108 = load i32, ptr %107, align 4, !tbaa !14
  %109 = icmp sle i32 %105, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %116

111:                                              ; preds = %104
  %112 = load i32, ptr %7, align 4, !tbaa !21
  call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %112) #5
  call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef 17) #5
  call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef 0) #5
  br label %113

113:                                              ; preds = %111
  %114 = load i32, ptr %7, align 4, !tbaa !21
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %7, align 4, !tbaa !21
  br label %104, !llvm.loop !22

116:                                              ; preds = %110
  %117 = load i8, ptr %6, align 1, !tbaa !17, !range !19, !noundef !20
  %118 = trunc i8 %117 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret i1 %118
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNSt14numeric_limitsIhE3maxEv() #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNSt14numeric_limitsItE3maxEv() #2 align 2

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

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

attributes #0 = { noreturn nounwind "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 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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn nounwind }
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, !11, i64 0}
!10 = !{!"_ZTS17charls_frame_info", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !11, i64 12}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!11, !11, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"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"

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info = external hidden unnamed_addr constant [82 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6charls18jpeg_stream_writer20write_segment_headerENS_16jpeg_marker_codeEm(ptr noundef nonnull align 8 dereferenceable(56), i8 noundef zeroext, i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(16) %1) local_unnamed_addr #1 align 2 {
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %4, label %5

4:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 85, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #3
  unreachable

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !10
  %.not25 = icmp eq i32 %7, 0
  br i1 %.not25, label %8, label %9

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #3
  unreachable

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %12 = add i32 %11, -2
  %or.cond = icmp ult i32 %12, 15
  br i1 %or.cond, label %13, label %.critedge

.critedge:                                        ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #3
  unreachable

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 12
  %15 = load i32, ptr %14, align 4, !tbaa !12
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %17, label %.critedge2

17:                                               ; preds = %13
  %18 = tail call noundef zeroext i8 @_ZNSt14numeric_limitsIhE3maxEv() #4
  %19 = zext i8 %18 to i32
  %.not26 = icmp ugt i32 %15, %19
  br i1 %.not26, label %.critedge2, label %20

.critedge2:                                       ; preds = %13, %17
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 88, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_writer28write_start_of_frame_segmentERK17charls_frame_info) #3
  unreachable

20:                                               ; preds = %17
  %21 = load i32, ptr %14, align 4, !tbaa !12
  %22 = sext i32 %21 to i64
  %23 = mul nsw i64 %22, 3
  %24 = add nsw i64 %23, 6
  tail call void @_ZN6charls18jpeg_stream_writer20write_segment_headerENS_16jpeg_marker_codeEm(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef zeroext -9, i64 noundef %24)
  %25 = load i32, ptr %10, align 4, !tbaa !11
  tail call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %25) #4
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = tail call noundef zeroext i16 @_ZNSt14numeric_limitsItE3maxEv() #4
  %28 = zext i16 %27 to i32
  %29 = icmp ugt i32 %26, %28
  br i1 %29, label %.thread30, label %30

.thread30:                                        ; preds = %20
  tail call void @_ZN6charls18jpeg_stream_writer12write_uint16Ej(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0) #4
  br label %39

30:                                               ; preds = %20
  %31 = load i32, ptr %6, align 4, !tbaa !10
  %32 = tail call noundef zeroext i16 @_ZNSt14numeric_limitsItE3maxEv() #4
  %33 = zext i16 %32 to i32
  %.fr = freeze i32 %31
  %34 = icmp ugt i32 %.fr, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  tail call void @_ZN6charls18jpeg_stream_writer12write_uint16Ej(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0) #4
  br label %39

36:                                               ; preds = %30
  %37 = load i32, ptr %6, align 4
  tail call void @_ZN6charls18jpeg_stream_writer12write_uint16Ej(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %37) #4
  %38 = load i32, ptr %1, align 4
  br label %39

39:                                               ; preds = %36, %.thread30, %35
  %40 = phi i1 [ true, %.thread30 ], [ true, %35 ], [ false, %36 ]
  %41 = phi i32 [ 0, %.thread30 ], [ 0, %35 ], [ %38, %36 ]
  tail call void @_ZN6charls18jpeg_stream_writer12write_uint16Ej(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %41) #4
  %42 = load i32, ptr %14, align 4, !tbaa !12
  tail call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %42) #4
  %43 = load i32, ptr %14, align 4, !tbaa !12
  %.not2733 = icmp slt i32 %43, 1
  br i1 %.not2733, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %39
  ret i1 %40

.lr.ph:                                           ; preds = %39, %.lr.ph
  %.034 = phi i32 [ %44, %.lr.ph ], [ 1, %39 ]
  tail call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %.034) #4
  tail call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 17) #4
  tail call void @_ZN6charls18jpeg_stream_writer11write_uint8Ei(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0) #4
  %44 = add nuw nsw i32 %.034, 1
  %45 = load i32, ptr %14, align 4, !tbaa !12
  %.not27.not = icmp slt i32 %.034, %45
  br i1 %.not27.not, label %.lr.ph, label %._crit_edge, !llvm.loop !13
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNSt14numeric_limitsIhE3maxEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNSt14numeric_limitsItE3maxEv() local_unnamed_addr #2 align 2

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

attributes #0 = { noreturn nounwind "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 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 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 = { noreturn nounwind }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS17charls_frame_info", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !7, i64 12}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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