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

; 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 [6 x i8], align 1
@.str = external hidden unnamed_addr constant [21 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 [6 x i8], align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = 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 6, ptr %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %6, ptr align 1 @__const.main.aPalette, i64 6, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  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)
  %11 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 2
  store i32 10, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 4
  store i16 99, ptr %12, align 8, !tbaa !12
  %13 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 5
  store i16 99, ptr %13, align 2, !tbaa !13
  %14 = getelementptr inbounds [6 x i8], ptr %6, i64 0, i64 0
  %15 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 0
  store ptr %14, ptr %15, align 8, !tbaa !14
  %16 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 6
  store i16 2, ptr %16, align 4, !tbaa !15
  %17 = getelementptr inbounds %struct.st_gifconfig, ptr %3, i32 0, i32 1
  store ptr @.str, ptr %17, align 8, !tbaa !16
  %18 = call ptr @cgif_newgif(ptr noundef %3)
  store ptr %18, ptr %2, align 8, !tbaa !17
  %19 = load ptr, ptr %2, align 8, !tbaa !17
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %24

21:                                               ; preds = %0
  %22 = load ptr, ptr @stderr, align 8, !tbaa !17
  %23 = call i32 @fputs(ptr noundef @.str.1, ptr noundef %22)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %77

24:                                               ; preds = %0
  %25 = call noalias ptr @malloc(i64 noundef 9801) #8
  store ptr %25, ptr %5, align 8, !tbaa !17
  %26 = load ptr, ptr %5, align 8, !tbaa !17
  call void @llvm.memset.p0.i64(ptr align 1 %26, i8 0, i64 9801, i1 false)
  %27 = load ptr, ptr %5, align 8, !tbaa !17
  %28 = getelementptr inbounds %struct.st_frameconfig, ptr %4, i32 0, i32 1
  store ptr %27, ptr %28, align 8, !tbaa !18
  %29 = getelementptr inbounds %struct.st_frameconfig, ptr %4, i32 0, i32 4
  store i16 100, ptr %29, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !21
  br label %30

30:                                               ; preds = %42, %24
  %31 = load i32, ptr %9, align 4, !tbaa !21
  %32 = icmp slt i32 %31, 9801
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %45

34:                                               ; preds = %30
  %35 = load i32, ptr %9, align 4, !tbaa !21
  %36 = srem i32 %35, 2
  %37 = trunc i32 %36 to i8
  %38 = load ptr, ptr %5, align 8, !tbaa !17
  %39 = load i32, ptr %9, align 4, !tbaa !21
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  store i8 %37, ptr %41, align 1, !tbaa !22
  br label %42

42:                                               ; preds = %34
  %43 = load i32, ptr %9, align 4, !tbaa !21
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !21
  br label %30, !llvm.loop !23

45:                                               ; preds = %33
  %46 = load ptr, ptr %2, align 8, !tbaa !17
  %47 = call i32 @cgif_addframe(ptr noundef %46, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !21
  br label %48

48:                                               ; preds = %61, %45
  %49 = load i32, ptr %10, align 4, !tbaa !21
  %50 = icmp slt i32 %49, 9801
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %48
  %53 = load i32, ptr %10, align 4, !tbaa !21
  %54 = srem i32 %53, 2
  %55 = sub nsw i32 1, %54
  %56 = trunc i32 %55 to i8
  %57 = load ptr, ptr %5, align 8, !tbaa !17
  %58 = load i32, ptr %10, align 4, !tbaa !21
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  store i8 %56, ptr %60, align 1, !tbaa !22
  br label %61

61:                                               ; preds = %52
  %62 = load i32, ptr %10, align 4, !tbaa !21
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %10, align 4, !tbaa !21
  br label %48, !llvm.loop !25

64:                                               ; preds = %51
  %65 = load ptr, ptr %2, align 8, !tbaa !17
  %66 = call i32 @cgif_addframe(ptr noundef %65, ptr noundef %4)
  store i32 %66, ptr %7, align 4, !tbaa !21
  %67 = load ptr, ptr %5, align 8, !tbaa !17
  call void @free(ptr noundef %67) #7
  %68 = load ptr, ptr %2, align 8, !tbaa !17
  %69 = call i32 @cgif_close(ptr noundef %68)
  store i32 %69, ptr %7, align 4, !tbaa !21
  %70 = load i32, ptr %7, align 4, !tbaa !21
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %76

72:                                               ; preds = %64
  %73 = load ptr, ptr @stderr, align 8, !tbaa !17
  %74 = load i32, ptr %7, align 4, !tbaa !21
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.2, i32 noundef %74) #7
  store i32 2, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %77

76:                                               ; preds = %64
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %77

77:                                               ; preds = %76, %72, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 6, 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
  %78 = load i32, ptr %1, align 4
  ret i32 %78
}

; 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, !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, !7, i64 8}
!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, !11, i64 24}
!21 = !{!10, !10, i64 0}
!22 = !{!8, !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


; 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 [6 x i8], align 1
@.str = external hidden unnamed_addr constant [21 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 [6 x i8], align 1
  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 6, ptr nonnull %3) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(6) %3, ptr noundef nonnull align 1 dereferenceable(6) @__const.main.aPalette, i64 6, 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 10, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 24
  store i16 99, ptr %6, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %1, i64 26
  store i16 99, 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 2, 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 %iter.check

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 %49

iter.check:                                       ; preds = %0
  %calloc = call dereferenceable_or_null(9801) ptr @calloc(i64 1, i64 9801)
  %15 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %calloc, ptr %15, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %2, i64 24
  store i16 100, ptr %16, align 8, !tbaa !20
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %iter.check
  %index = phi i64 [ 0, %iter.check ], [ %index.next.3, %vector.body ]
  %vec.ind = phi <16 x i8> [ <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, %iter.check ], [ %vec.ind.next.3, %vector.body ]
  %17 = and <16 x i8> %vec.ind, <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>
  %18 = getelementptr inbounds i8, ptr %calloc, i64 %index
  store <16 x i8> %17, ptr %18, align 1, !tbaa !21
  %index.next = or disjoint i64 %index, 16
  %19 = and <16 x i8> %vec.ind, <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>
  %20 = getelementptr inbounds i8, ptr %calloc, i64 %index.next
  store <16 x i8> %19, ptr %20, align 1, !tbaa !21
  %index.next.1 = or disjoint i64 %index, 32
  %21 = and <16 x i8> %vec.ind, <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>
  %22 = getelementptr inbounds i8, ptr %calloc, i64 %index.next.1
  store <16 x i8> %21, ptr %22, align 1, !tbaa !21
  %index.next.2 = or disjoint i64 %index, 48
  %23 = and <16 x i8> %vec.ind, <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>
  %24 = getelementptr inbounds i8, ptr %calloc, i64 %index.next.2
  store <16 x i8> %23, ptr %24, align 1, !tbaa !21
  %index.next.3 = add nuw nsw i64 %index, 64
  %vec.ind.next.3 = add <16 x i8> %vec.ind, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>
  %25 = icmp eq i64 %index.next.3, 9792
  br i1 %25, label %vec.epilog.vector.body, label %vector.body, !llvm.loop !22

vec.epilog.vector.body:                           ; preds = %vector.body
  %26 = getelementptr inbounds i8, ptr %calloc, i64 9792
  store <8 x i8> <i8 0, i8 1, i8 0, i8 1, i8 0, i8 1, i8 0, i8 1>, ptr %26, align 1, !tbaa !21
  %27 = getelementptr inbounds i8, ptr %calloc, i64 9800
  store i8 0, ptr %27, align 1, !tbaa !21
  %28 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  br label %vector.body40

vector.body40:                                    ; preds = %vector.body40, %vec.epilog.vector.body
  %index41 = phi i64 [ 0, %vec.epilog.vector.body ], [ %index.next44.3, %vector.body40 ]
  %vec.ind42 = phi <16 x i8> [ <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, %vec.epilog.vector.body ], [ %vec.ind.next43.3, %vector.body40 ]
  %29 = and <16 x i8> %vec.ind42, <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>
  %30 = xor <16 x i8> %29, <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>
  %31 = getelementptr inbounds i8, ptr %calloc, i64 %index41
  store <16 x i8> %30, ptr %31, align 1, !tbaa !21
  %index.next44 = or disjoint i64 %index41, 16
  %32 = and <16 x i8> %vec.ind42, <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>
  %33 = xor <16 x i8> %32, <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>
  %34 = getelementptr inbounds i8, ptr %calloc, i64 %index.next44
  store <16 x i8> %33, ptr %34, align 1, !tbaa !21
  %index.next44.1 = or disjoint i64 %index41, 32
  %35 = and <16 x i8> %vec.ind42, <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>
  %36 = xor <16 x i8> %35, <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>
  %37 = getelementptr inbounds i8, ptr %calloc, i64 %index.next44.1
  store <16 x i8> %36, ptr %37, align 1, !tbaa !21
  %index.next44.2 = or disjoint i64 %index41, 48
  %38 = and <16 x i8> %vec.ind42, <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>
  %39 = xor <16 x i8> %38, <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>
  %40 = getelementptr inbounds i8, ptr %calloc, i64 %index.next44.2
  store <16 x i8> %39, ptr %40, align 1, !tbaa !21
  %index.next44.3 = add nuw nsw i64 %index41, 64
  %vec.ind.next43.3 = add <16 x i8> %vec.ind42, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>
  %41 = icmp eq i64 %index.next44.3, 9792
  br i1 %41, label %vec.epilog.vector.body52, label %vector.body40, !llvm.loop !26

vec.epilog.vector.body52:                         ; preds = %vector.body40
  %42 = getelementptr inbounds i8, ptr %calloc, i64 9792
  store <8 x i8> <i8 1, i8 0, i8 1, i8 0, i8 1, i8 0, i8 1, i8 0>, ptr %42, align 1, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %calloc, i64 9800
  store i8 1, ptr %43, align 1, !tbaa !21
  %44 = call i32 @cgif_addframe(ptr noundef nonnull %10, ptr noundef nonnull %2) #8
  call void @free(ptr noundef nonnull %calloc) #8
  %45 = call i32 @cgif_close(ptr noundef nonnull %10) #8
  %.not = icmp eq i32 %45, 0
  br i1 %.not, label %49, label %46

46:                                               ; preds = %vec.epilog.vector.body52
  %47 = load ptr, ptr @stderr, align 8, !tbaa !17
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.2, i32 noundef %45) #10
  br label %49

49:                                               ; preds = %vec.epilog.vector.body52, %46, %12
  %.020 = phi i32 [ 1, %12 ], [ 2, %46 ], [ 0, %vec.epilog.vector.body52 ]
  call void @llvm.lifetime.end.p0(i64 6, 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 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 #6

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

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7

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 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 #7 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #8 = { nounwind }
attributes #9 = { cold }
attributes #10 = { 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, !7, i64 8}
!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, !11, i64 24}
!21 = !{!8, !8, i64 0}
!22 = distinct !{!22, !23, !24, !25}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !23, !24, !25}


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