; LLVM IR from dloebl/cgif :: tests (animated_stripes_horizontal)

; 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.st_gifconfig = type { ptr, ptr, i32, i32, i16, i16, i16, i16, ptr, ptr }
%struct.st_frameconfig = type { ptr, ptr, i32, i32, i16, i16, i8 }

@__const.main.aPalette = external hidden unnamed_addr constant [30 x i8], align 16
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca %struct.st_gifconfig, align 8
  %4 = alloca %struct.st_frameconfig, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [30 x i8], align 16
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 30, ptr %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.main.aPalette, i64 30, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  store i8 10, ptr %8, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 10, ptr %9, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 48, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 32, i1 false)
  %13 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 2
  store i32 2, ptr %13, align 8, !tbaa !10
  %14 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 4
  store i16 100, ptr %14, align 8, !tbaa !14
  %15 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 5
  store i16 100, ptr %15, align 2, !tbaa !15
  %16 = getelementptr inbounds [30 x i8], ptr %6, i64 0, i64 0
  %17 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 0
  store ptr %16, ptr %17, align 8, !tbaa !16
  %18 = load i8, ptr %8, align 1, !tbaa !5
  %19 = zext i8 %18 to i16
  %20 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 6
  store i16 %19, ptr %20, align 4, !tbaa !17
  %21 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 1
  store ptr @.str, ptr %21, align 8, !tbaa !18
  %22 = call ptr @cgif_newgif(ptr noundef %3)
  store ptr %22, ptr %2, align 8, !tbaa !19
  %23 = load ptr, ptr %2, align 8, !tbaa !19
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %28

25:                                               ; preds = %0
  %26 = load ptr, ptr @stderr, align 8, !tbaa !19
  %27 = call i32 @fputs(ptr noundef @.str.1, ptr noundef %26)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %10, align 4
  br label %81

28:                                               ; preds = %0
  %29 = call noalias ptr @malloc(i64 noundef 10000) #8
  store ptr %29, ptr %5, align 8, !tbaa !19
  %30 = getelementptr inbounds %struct.st_frameconfig, ptr %4, i32 0, i32 3
  store i32 3, ptr %30, align 4, !tbaa !20
  %31 = load ptr, ptr %5, align 8, !tbaa !19
  %32 = getelementptr inbounds %struct.st_frameconfig, ptr %4, i32 0, i32 1
  store ptr %31, ptr %32, align 8, !tbaa !22
  %33 = getelementptr inbounds %struct.st_frameconfig, ptr %4, i32 0, i32 4
  store i16 50, ptr %33, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %34

34:                                               ; preds = %67, %28
  %35 = load i32, ptr %11, align 4, !tbaa !8
  %36 = load i32, ptr %9, align 4, !tbaa !8
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %70

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %40

40:                                               ; preds = %61, %39
  %41 = load i32, ptr %12, align 4, !tbaa !8
  %42 = icmp slt i32 %41, 10000
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %64

44:                                               ; preds = %40
  %45 = load i32, ptr %11, align 4, !tbaa !8
  %46 = load i8, ptr %8, align 1, !tbaa !5
  %47 = zext i8 %46 to i32
  %48 = load i32, ptr %12, align 4, !tbaa !8
  %49 = mul nsw i32 %47, %48
  %50 = sdiv i32 %49, 100
  %51 = sdiv i32 %50, 100
  %52 = add nsw i32 %45, %51
  %53 = load i8, ptr %8, align 1, !tbaa !5
  %54 = zext i8 %53 to i32
  %55 = srem i32 %52, %54
  %56 = trunc i32 %55 to i8
  %57 = load ptr, ptr %5, align 8, !tbaa !19
  %58 = load i32, ptr %12, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  store i8 %56, ptr %60, align 1, !tbaa !5
  br label %61

61:                                               ; preds = %44
  %62 = load i32, ptr %12, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %12, align 4, !tbaa !8
  br label %40, !llvm.loop !24

64:                                               ; preds = %43
  %65 = load ptr, ptr %2, align 8, !tbaa !19
  %66 = call i32 @cgif_addframe(ptr noundef %65, ptr noundef %4)
  store i32 %66, ptr %7, align 4, !tbaa !8
  br label %67

67:                                               ; preds = %64
  %68 = load i32, ptr %11, align 4, !tbaa !8
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %11, align 4, !tbaa !8
  br label %34, !llvm.loop !26

70:                                               ; preds = %38
  %71 = load ptr, ptr %5, align 8, !tbaa !19
  call void @free(ptr noundef %71) #7
  %72 = load ptr, ptr %2, align 8, !tbaa !19
  %73 = call i32 @cgif_close(ptr noundef %72)
  store i32 %73, ptr %7, align 4, !tbaa !8
  %74 = load i32, ptr %7, align 4, !tbaa !8
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %80

76:                                               ; preds = %70
  %77 = load ptr, ptr @stderr, align 8, !tbaa !19
  %78 = load i32, ptr %7, align 4, !tbaa !8
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.2, i32 noundef %78) #7
  store i32 2, ptr %1, align 4
  store i32 1, ptr %10, align 4
  br label %81

80:                                               ; preds = %70
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  br label %81

81:                                               ; preds = %80, %76, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 30, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %82 = load i32, ptr %1, align 4
  ret i32 %82
}

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare ptr @cgif_newgif(ptr noundef) #4

declare i32 @fputs(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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

declare i32 @cgif_addframe(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

declare i32 @cgif_close(ptr noundef) #4

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 allocsize(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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !9, i64 16}
!11 = !{!"st_gifconfig", !12, i64 0, !12, i64 8, !9, i64 16, !9, i64 20, !13, i64 24, !13, i64 26, !13, i64 28, !13, i64 30, !12, i64 32, !12, i64 40}
!12 = !{!"any pointer", !6, i64 0}
!13 = !{!"short", !6, i64 0}
!14 = !{!11, !13, i64 24}
!15 = !{!11, !13, i64 26}
!16 = !{!11, !12, i64 0}
!17 = !{!11, !13, i64 28}
!18 = !{!11, !12, i64 8}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !9, i64 20}
!21 = !{!"st_frameconfig", !12, i64 0, !12, i64 8, !9, i64 16, !9, i64 20, !13, i64 24, !13, i64 26, !6, i64 28}
!22 = !{!21, !12, i64 8}
!23 = !{!21, !13, i64 24}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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

%struct.st_gifconfig = type { ptr, ptr, i32, i32, i16, i16, i16, i16, ptr, ptr }
%struct.st_frameconfig = type { ptr, ptr, i32, i32, i16, i16, i8 }

@__const.main.aPalette = external hidden unnamed_addr constant [30 x i8], align 16
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.st_gifconfig, align 8
  %2 = alloca %struct.st_frameconfig, align 8
  %3 = alloca [30 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %3) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(30) %3, ptr noundef nonnull align 16 dereferenceable(30) @__const.main.aPalette, i64 30, i1 false)
  %4 = getelementptr inbounds i8, ptr %1, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %4, i8 0, i64 32, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 0, i64 32, i1 false)
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 2, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 24
  store i16 100, ptr %6, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %1, i64 26
  store i16 100, ptr %7, align 2, !tbaa !13
  store ptr %3, ptr %1, align 8, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %1, i64 28
  store i16 10, ptr %8, align 4, !tbaa !15
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr @.str, ptr %9, align 8, !tbaa !16
  %10 = call ptr @cgif_newgif(ptr noundef nonnull %1) #8
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %.preheader

12:                                               ; preds = %0
  %13 = load ptr, ptr @stderr, align 8, !tbaa !17
  %14 = call i32 @fputs(ptr noundef nonnull @.str.1, ptr noundef %13) #9
  br label %96

.preheader:                                       ; preds = %0
  %15 = call noalias dereferenceable_or_null(10000) ptr @malloc(i64 noundef 10000) #10
  %16 = getelementptr inbounds i8, ptr %2, i64 20
  store i32 3, ptr %16, align 4, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %15, ptr %17, align 8, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %2, i64 24
  store i16 50, ptr %18, align 8, !tbaa !21
  br label %vector.body

vector.body:                                      ; preds = %vector.body.1, %.preheader
  %index = phi i64 [ 0, %.preheader ], [ %index.next.1, %vector.body.1 ]
  %vec.ind = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader ], [ %vec.ind.next.1, %vector.body.1 ]
  %19 = udiv <16 x i16> %vec.ind, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %20 = trunc nuw nsw <16 x i16> %19 to <16 x i8>
  %21 = urem <16 x i8> %20, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %22 = getelementptr inbounds i8, ptr %15, i64 %index
  store <16 x i8> %21, ptr %22, align 1, !tbaa !22
  %23 = icmp eq i64 %index, 9984
  br i1 %23, label %.preheader.1, label %vector.body.1, !llvm.loop !23

vector.body.1:                                    ; preds = %vector.body
  %index.next = or disjoint i64 %index, 16
  %vec.ind.next = add <16 x i16> %vec.ind, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %24 = udiv <16 x i16> %vec.ind.next, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %25 = trunc nuw nsw <16 x i16> %24 to <16 x i8>
  %26 = urem <16 x i8> %25, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %27 = getelementptr inbounds i8, ptr %15, i64 %index.next
  store <16 x i8> %26, ptr %27, align 1, !tbaa !22
  %index.next.1 = add nuw nsw i64 %index, 32
  %vec.ind.next.1 = add <16 x i16> %vec.ind, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>
  br label %vector.body

.preheader.1:                                     ; preds = %vector.body
  %28 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body58

vector.body58:                                    ; preds = %vector.body58, %.preheader.1
  %index59 = phi i64 [ 0, %.preheader.1 ], [ %index.next62, %vector.body58 ]
  %vec.ind60 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.1 ], [ %vec.ind.next61, %vector.body58 ]
  %29 = udiv <16 x i16> %vec.ind60, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %30 = trunc nuw nsw <16 x i16> %29 to <16 x i8>
  %31 = add nuw <16 x i8> %30, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  %32 = urem <16 x i8> %31, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %33 = getelementptr inbounds i8, ptr %15, i64 %index59
  store <16 x i8> %32, ptr %33, align 1, !tbaa !22
  %index.next62 = add nuw i64 %index59, 16
  %vec.ind.next61 = add <16 x i16> %vec.ind60, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %34 = icmp eq i64 %index.next62, 10000
  br i1 %34, label %.preheader.2, label %vector.body58, !llvm.loop !27

.preheader.2:                                     ; preds = %vector.body58
  %35 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body67

vector.body67:                                    ; preds = %vector.body67, %.preheader.2
  %index68 = phi i64 [ 0, %.preheader.2 ], [ %index.next71, %vector.body67 ]
  %vec.ind69 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.2 ], [ %vec.ind.next70, %vector.body67 ]
  %36 = udiv <16 x i16> %vec.ind69, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %37 = trunc nuw nsw <16 x i16> %36 to <16 x i8>
  %38 = add nuw <16 x i8> %37, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
  %39 = urem <16 x i8> %38, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %40 = getelementptr inbounds i8, ptr %15, i64 %index68
  store <16 x i8> %39, ptr %40, align 1, !tbaa !22
  %index.next71 = add nuw i64 %index68, 16
  %vec.ind.next70 = add <16 x i16> %vec.ind69, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %41 = icmp eq i64 %index.next71, 10000
  br i1 %41, label %.preheader.3, label %vector.body67, !llvm.loop !28

.preheader.3:                                     ; preds = %vector.body67
  %42 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body76

vector.body76:                                    ; preds = %vector.body76, %.preheader.3
  %index77 = phi i64 [ 0, %.preheader.3 ], [ %index.next80, %vector.body76 ]
  %vec.ind78 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.3 ], [ %vec.ind.next79, %vector.body76 ]
  %43 = udiv <16 x i16> %vec.ind78, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %44 = trunc nuw nsw <16 x i16> %43 to <16 x i8>
  %45 = add nuw <16 x i8> %44, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
  %46 = urem <16 x i8> %45, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %47 = getelementptr inbounds i8, ptr %15, i64 %index77
  store <16 x i8> %46, ptr %47, align 1, !tbaa !22
  %index.next80 = add nuw i64 %index77, 16
  %vec.ind.next79 = add <16 x i16> %vec.ind78, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %48 = icmp eq i64 %index.next80, 10000
  br i1 %48, label %.preheader.4, label %vector.body76, !llvm.loop !29

.preheader.4:                                     ; preds = %vector.body76
  %49 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body85

vector.body85:                                    ; preds = %vector.body85, %.preheader.4
  %index86 = phi i64 [ 0, %.preheader.4 ], [ %index.next89, %vector.body85 ]
  %vec.ind87 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.4 ], [ %vec.ind.next88, %vector.body85 ]
  %50 = udiv <16 x i16> %vec.ind87, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %51 = trunc nuw nsw <16 x i16> %50 to <16 x i8>
  %52 = add nuw <16 x i8> %51, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
  %53 = urem <16 x i8> %52, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %54 = getelementptr inbounds i8, ptr %15, i64 %index86
  store <16 x i8> %53, ptr %54, align 1, !tbaa !22
  %index.next89 = add nuw i64 %index86, 16
  %vec.ind.next88 = add <16 x i16> %vec.ind87, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %55 = icmp eq i64 %index.next89, 10000
  br i1 %55, label %.preheader.5, label %vector.body85, !llvm.loop !30

.preheader.5:                                     ; preds = %vector.body85
  %56 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body94

vector.body94:                                    ; preds = %vector.body94, %.preheader.5
  %index95 = phi i64 [ 0, %.preheader.5 ], [ %index.next98, %vector.body94 ]
  %vec.ind96 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.5 ], [ %vec.ind.next97, %vector.body94 ]
  %57 = udiv <16 x i16> %vec.ind96, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %58 = trunc nuw nsw <16 x i16> %57 to <16 x i8>
  %59 = add nuw <16 x i8> %58, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
  %60 = urem <16 x i8> %59, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %61 = getelementptr inbounds i8, ptr %15, i64 %index95
  store <16 x i8> %60, ptr %61, align 1, !tbaa !22
  %index.next98 = add nuw i64 %index95, 16
  %vec.ind.next97 = add <16 x i16> %vec.ind96, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %62 = icmp eq i64 %index.next98, 10000
  br i1 %62, label %.preheader.6, label %vector.body94, !llvm.loop !31

.preheader.6:                                     ; preds = %vector.body94
  %63 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body103

vector.body103:                                   ; preds = %vector.body103, %.preheader.6
  %index104 = phi i64 [ 0, %.preheader.6 ], [ %index.next107, %vector.body103 ]
  %vec.ind105 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.6 ], [ %vec.ind.next106, %vector.body103 ]
  %64 = udiv <16 x i16> %vec.ind105, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %65 = trunc nuw nsw <16 x i16> %64 to <16 x i8>
  %66 = add nuw <16 x i8> %65, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
  %67 = urem <16 x i8> %66, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %68 = getelementptr inbounds i8, ptr %15, i64 %index104
  store <16 x i8> %67, ptr %68, align 1, !tbaa !22
  %index.next107 = add nuw i64 %index104, 16
  %vec.ind.next106 = add <16 x i16> %vec.ind105, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %69 = icmp eq i64 %index.next107, 10000
  br i1 %69, label %.preheader.7, label %vector.body103, !llvm.loop !32

.preheader.7:                                     ; preds = %vector.body103
  %70 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body112

vector.body112:                                   ; preds = %vector.body112, %.preheader.7
  %index113 = phi i64 [ 0, %.preheader.7 ], [ %index.next116, %vector.body112 ]
  %vec.ind114 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.7 ], [ %vec.ind.next115, %vector.body112 ]
  %71 = udiv <16 x i16> %vec.ind114, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %72 = trunc nuw nsw <16 x i16> %71 to <16 x i8>
  %73 = add nuw <16 x i8> %72, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %74 = urem <16 x i8> %73, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %75 = getelementptr inbounds i8, ptr %15, i64 %index113
  store <16 x i8> %74, ptr %75, align 1, !tbaa !22
  %index.next116 = add nuw i64 %index113, 16
  %vec.ind.next115 = add <16 x i16> %vec.ind114, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %76 = icmp eq i64 %index.next116, 10000
  br i1 %76, label %.preheader.8, label %vector.body112, !llvm.loop !33

.preheader.8:                                     ; preds = %vector.body112
  %77 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body121

vector.body121:                                   ; preds = %vector.body121, %.preheader.8
  %index122 = phi i64 [ 0, %.preheader.8 ], [ %index.next125, %vector.body121 ]
  %vec.ind123 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.8 ], [ %vec.ind.next124, %vector.body121 ]
  %78 = udiv <16 x i16> %vec.ind123, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %79 = trunc nuw nsw <16 x i16> %78 to <16 x i8>
  %80 = add nuw <16 x i8> %79, <i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8>
  %81 = urem <16 x i8> %80, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %82 = getelementptr inbounds i8, ptr %15, i64 %index122
  store <16 x i8> %81, ptr %82, align 1, !tbaa !22
  %index.next125 = add nuw i64 %index122, 16
  %vec.ind.next124 = add <16 x i16> %vec.ind123, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %83 = icmp eq i64 %index.next125, 10000
  br i1 %83, label %.preheader.9, label %vector.body121, !llvm.loop !34

.preheader.9:                                     ; preds = %vector.body121
  %84 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body130

vector.body130:                                   ; preds = %vector.body130, %.preheader.9
  %index131 = phi i64 [ 0, %.preheader.9 ], [ %index.next134, %vector.body130 ]
  %vec.ind132 = phi <16 x i16> [ <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, %.preheader.9 ], [ %vec.ind.next133, %vector.body130 ]
  %85 = udiv <16 x i16> %vec.ind132, <i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000, i16 1000>
  %86 = trunc nuw nsw <16 x i16> %85 to <16 x i8>
  %87 = add nuw <16 x i8> %86, <i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9>
  %88 = urem <16 x i8> %87, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %89 = getelementptr inbounds i8, ptr %15, i64 %index131
  store <16 x i8> %88, ptr %89, align 1, !tbaa !22
  %index.next134 = add nuw i64 %index131, 16
  %vec.ind.next133 = add <16 x i16> %vec.ind132, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %90 = icmp eq i64 %index.next134, 10000
  br i1 %90, label %middle.block126, label %vector.body130, !llvm.loop !35

middle.block126:                                  ; preds = %vector.body130
  %91 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  call void @free(ptr noundef nonnull %15) #8
  %92 = call i32 @cgif_close(ptr noundef nonnull %10) #8
  %.not = icmp eq i32 %92, 0
  br i1 %.not, label %96, label %93

93:                                               ; preds = %middle.block126
  %94 = load ptr, ptr @stderr, align 8, !tbaa !17
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.2, i32 noundef %92) #11
  br label %96

96:                                               ; preds = %middle.block126, %93, %12
  %.020 = phi i32 [ 1, %12 ], [ 2, %93 ], [ 0, %middle.block126 ]
  call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #8
  ret i32 %.020
}

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare ptr @cgif_newgif(ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fputs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

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

declare i32 @cgif_addframe(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

declare i32 @cgif_close(ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = { nofree 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 #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { nounwind }
attributes #9 = { cold }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { cold 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, !10, i64 16}
!6 = !{!"st_gifconfig", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 26, !11, i64 28, !11, i64 30, !7, i64 32, !7, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!6, !11, i64 24}
!13 = !{!6, !11, i64 26}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !11, i64 28}
!16 = !{!6, !7, i64 8}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !10, i64 20}
!19 = !{!"st_frameconfig", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 26, !8, i64 28}
!20 = !{!19, !7, i64 8}
!21 = !{!19, !11, i64 24}
!22 = !{!8, !8, i64 0}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24, !25, !26}
!28 = distinct !{!28, !24, !25, !26}
!29 = distinct !{!29, !24, !25, !26}
!30 = distinct !{!30, !24, !25, !26}
!31 = distinct !{!31, !24, !25, !26}
!32 = distinct !{!32, !24, !25, !26}
!33 = distinct !{!33, !24, !25, !26}
!34 = distinct !{!34, !24, !25, !26}
!35 = distinct !{!35, !24, !25, !26}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass