; LLVM IR from jingweizhanghuai/Morn :: src/image (morn_image_convert)

; 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.MImage = type { i32, i32, i32, [4 x ptr], ptr }

@.str = external hidden unnamed_addr constant [86 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@__FUNCTION__.m_ImageYUVToGray = external hidden unnamed_addr constant [17 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #1

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

declare void @ImageRedefine(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @m_ImageYUVToGray(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %18, label %14

14:                                               ; preds = %11
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = ptrtoint ptr %15 to i64
  %17 = icmp eq i64 %16, -1
  br i1 %17, label %18, label %19

18:                                               ; preds = %14, %11
  br label %48

19:                                               ; preds = %14
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.MImage, ptr %20, i32 0, i32 3
  %22 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 0
  %23 = icmp eq ptr %22, null
  br i1 %23, label %45, label %24

24:                                               ; preds = %19
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.MImage, ptr %25, i32 0, i32 3
  %27 = getelementptr inbounds [4 x ptr], ptr %26, i64 0, i64 0
  %28 = ptrtoint ptr %27 to i64
  %29 = icmp eq i64 %28, -1
  br i1 %29, label %45, label %30

30:                                               ; preds = %24
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.MImage, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = icmp sle i32 %33, 0
  br i1 %34, label %45, label %35

35:                                               ; preds = %30
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.MImage, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !12
  %39 = icmp sle i32 %38, 0
  br i1 %39, label %45, label %40

40:                                               ; preds = %35
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.MImage, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = icmp sle i32 %43, 0
  br label %45

45:                                               ; preds = %40, %35, %30, %24, %19
  %46 = phi i1 [ true, %35 ], [ true, %30 ], [ true, %24 ], [ true, %19 ], [ %44, %40 ]
  %47 = zext i1 %46 to i32
  br label %48

48:                                               ; preds = %45, %18
  %49 = phi i32 [ 1, %18 ], [ %47, %45 ]
  store i32 %49, ptr %5, align 4, !tbaa !14
  %50 = load i32, ptr %5, align 4, !tbaa !14
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = load i32, ptr %5, align 4, !tbaa !14
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %53, i32 noundef -1, ptr noundef @.str, i32 noundef 86, ptr noundef @__FUNCTION__.m_ImageYUVToGray, ptr noundef @.str.1)
  br label %54

54:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.MImage, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !9
  %60 = icmp slt i32 %59, 3
  %61 = zext i1 %60 to i32
  store i32 %61, ptr %6, align 4, !tbaa !14
  %62 = load i32, ptr %6, align 4, !tbaa !14
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %66

64:                                               ; preds = %56
  %65 = load i32, ptr %6, align 4, !tbaa !14
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %65, i32 noundef -1, ptr noundef @.str, i32 noundef 87, ptr noundef @__FUNCTION__.m_ImageYUVToGray, ptr noundef @.str.1)
  br label %66

66:                                               ; preds = %64, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = icmp eq ptr %68, null
  br i1 %69, label %74, label %70

70:                                               ; preds = %67
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = ptrtoint ptr %71 to i64
  %73 = icmp eq i64 %72, -1
  br i1 %73, label %74, label %76

74:                                               ; preds = %70, %67
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %75, ptr %4, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %74, %70
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = icmp ne ptr %77, %78
  br i1 %79, label %80, label %165

80:                                               ; preds = %76
  br label %81

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 4, ptr %7, align 4, !tbaa !14
  %82 = load i32, ptr %7, align 4, !tbaa !14
  %83 = icmp eq i32 %82, 2
  br i1 %83, label %84, label %92

84:                                               ; preds = %81
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.MImage, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !12
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.MImage, ptr %89, i32 0, i32 3
  %91 = getelementptr inbounds [4 x ptr], ptr %90, i64 0, i64 0
  call void @ImageRedefine(ptr noundef %85, i32 noundef -1, i32 noundef 1, i32 noundef %88, ptr noundef %91)
  br label %131

92:                                               ; preds = %81
  %93 = load i32, ptr %7, align 4, !tbaa !14
  %94 = icmp eq i32 %93, 3
  br i1 %94, label %95, label %106

95:                                               ; preds = %92
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.MImage, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !12
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.MImage, ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 8, !tbaa !13
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.MImage, ptr %103, i32 0, i32 3
  %105 = getelementptr inbounds [4 x ptr], ptr %104, i64 0, i64 0
  call void @ImageRedefine(ptr noundef %96, i32 noundef 1, i32 noundef %99, i32 noundef %102, ptr noundef %105)
  br label %130

106:                                              ; preds = %92
  %107 = load i32, ptr %7, align 4, !tbaa !14
  %108 = icmp eq i32 %107, 4
  br i1 %108, label %109, label %120

109:                                              ; preds = %106
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.MImage, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !12
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.MImage, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 8, !tbaa !13
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MImage, ptr %117, i32 0, i32 3
  %119 = getelementptr inbounds [4 x ptr], ptr %118, i64 0, i64 0
  call void @ImageRedefine(ptr noundef %110, i32 noundef 1, i32 noundef %113, i32 noundef %116, ptr noundef %119)
  br label %129

120:                                              ; preds = %106
  br label %121

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !14
  %122 = load i32, ptr %8, align 4, !tbaa !14
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %126

124:                                              ; preds = %121
  %125 = load i32, ptr %8, align 4, !tbaa !14
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %125, i32 noundef -1, ptr noundef @.str, i32 noundef 91, ptr noundef @__FUNCTION__.m_ImageYUVToGray, ptr noundef @.str.2)
  br label %126

126:                                              ; preds = %124, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128, %109
  br label %130

130:                                              ; preds = %129, %95
  br label %131

131:                                              ; preds = %130, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %132

132:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %133

133:                                              ; preds = %161, %132
  %134 = load i32, ptr %9, align 4, !tbaa !14
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.MImage, ptr %135, i32 0, i32 1
  %137 = load i32, ptr %136, align 4, !tbaa !12
  %138 = icmp slt i32 %134, %137
  br i1 %138, label %139, label %164

139:                                              ; preds = %133
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.MImage, ptr %140, i32 0, i32 3
  %142 = getelementptr inbounds [4 x ptr], ptr %141, i64 0, i64 0
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = load i32, ptr %9, align 4, !tbaa !14
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds ptr, ptr %143, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.MImage, ptr %148, i32 0, i32 3
  %150 = getelementptr inbounds [4 x ptr], ptr %149, i64 0, i64 0
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  %152 = load i32, ptr %9, align 4, !tbaa !14
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds ptr, ptr %151, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.MImage, ptr %156, i32 0, i32 2
  %158 = load i32, ptr %157, align 8, !tbaa !13
  %159 = sext i32 %158 to i64
  %160 = mul i64 %159, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %147, ptr align 1 %155, i64 %160, i1 false)
  br label %161

161:                                              ; preds = %139
  %162 = load i32, ptr %9, align 4, !tbaa !14
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %9, align 4, !tbaa !14
  br label %133, !llvm.loop !15

164:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %165

165:                                              ; preds = %164, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !14
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = call ptr @m_PropertyWrite(ptr noundef %166, ptr noundef @.str.3, ptr noundef %10, i32 noundef 4)
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.MImage, ptr %168, i32 0, i32 0
  store i32 1, ptr %169, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"MImage", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !6, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 8}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@__FUNCTION__.m_ImageYUVToGray = external hidden unnamed_addr constant [17 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, 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

declare void @ImageRedefine(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @m_ImageYUVToGray(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca i32, align 4
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %4 [
    i64 -1, label %.critedge
    i64 0, label %.critedge
  ]

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = icmp eq ptr %5, inttoptr (i64 -1 to ptr)
  br i1 %6, label %.critedge, label %7

7:                                                ; preds = %4
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %9 = icmp slt i32 %8, 1
  br i1 %9, label %.critedge, label %10

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = icmp slt i32 %12, 1
  br i1 %13, label %.critedge, label %14

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !12
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %18, label %.critedge

.critedge:                                        ; preds = %2, %2, %10, %7, %4, %14
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 86, ptr noundef nonnull @__FUNCTION__.m_ImageYUVToGray, ptr noundef nonnull @.str.1) #4
  %.pre = load i32, ptr %0, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %.critedge, %14
  %19 = phi i32 [ %.pre, %.critedge ], [ %8, %14 ]
  %20 = icmp slt i32 %19, 3
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 87, ptr noundef nonnull @__FUNCTION__.m_ImageYUVToGray, ptr noundef nonnull @.str.1) #4
  br label %22

22:                                               ; preds = %21, %18
  %magicptr57 = ptrtoint ptr %1 to i64
  switch i64 %magicptr57, label %23 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

23:                                               ; preds = %22
  %.not56 = icmp eq ptr %1, %0
  br i1 %.not56, label %.thread, label %24

24:                                               ; preds = %23
  %25 = getelementptr inbounds i8, ptr %0, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %1, i64 16
  tail call void @ImageRedefine(ptr noundef %1, i32 noundef 1, i32 noundef %26, i32 noundef %28, ptr noundef nonnull %29) #4
  %30 = getelementptr inbounds i8, ptr %1, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %24
  %33 = getelementptr inbounds i8, ptr %0, i64 16
  %34 = getelementptr inbounds i8, ptr %1, i64 8
  br label %35

35:                                               ; preds = %.lr.ph, %35
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %35 ]
  %36 = load ptr, ptr %29, align 8, !tbaa !13
  %37 = getelementptr inbounds ptr, ptr %36, i64 %indvars.iv
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = load ptr, ptr %33, align 8, !tbaa !13
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = load i32, ptr %34, align 8, !tbaa !12
  %43 = sext i32 %42 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %38, ptr align 1 %41, i64 %43, i1 false)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = load i32, ptr %30, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next, %45
  br i1 %46, label %35, label %.thread, !llvm.loop !14

.thread:                                          ; preds = %35, %24, %22, %22, %23
  %.05260 = phi ptr [ %1, %23 ], [ %0, %22 ], [ %0, %22 ], [ %1, %24 ], [ %1, %35 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 1, ptr %3, align 4, !tbaa !16
  %47 = call ptr @m_PropertyWrite(ptr noundef %.05260, ptr noundef nonnull @.str.3, ptr noundef nonnull %3, i32 noundef 4) #4
  store i32 1, ptr %.05260, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"MImage", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 16, !10, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 8}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!7, !7, i64 0}


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