; LLVM IR from Try/Tempest :: Engine/thirdparty/libpng (png)

; 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"

@.str.66 = external hidden unnamed_addr constant [34 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

; Function Attrs: noreturn
declare void @png_error(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

; Function Attrs: nounwind uwtable
define dso_local void @png_ascii_from_fixed(ptr noalias noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [10 x i8], align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !11
  %16 = load i64, ptr %7, align 8, !tbaa !9
  %17 = icmp ugt i64 %16, 12
  br i1 %17, label %18, label %112

18:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %19 = load i32, ptr %8, align 4, !tbaa !11
  %20 = icmp slt i32 %19, 0
  br i1 %20, label %21, label %26

21:                                               ; preds = %18
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i32 1
  store ptr %23, ptr %6, align 8, !tbaa !5
  store i8 45, ptr %22, align 1, !tbaa !13
  %24 = load i32, ptr %8, align 4, !tbaa !11
  %25 = sub nsw i32 0, %24
  store i32 %25, ptr %9, align 4, !tbaa !11
  br label %28

26:                                               ; preds = %18
  %27 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %27, ptr %9, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %26, %21
  %29 = load i32, ptr %9, align 4, !tbaa !11
  %30 = icmp ule i32 %29, -2147483648
  br i1 %30, label %31, label %108

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 16, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 10, ptr %12) #3
  br label %32

32:                                               ; preds = %56, %31
  %33 = load i32, ptr %9, align 4, !tbaa !11
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %58

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %36 = load i32, ptr %9, align 4, !tbaa !11
  %37 = udiv i32 %36, 10
  store i32 %37, ptr %13, align 4, !tbaa !11
  %38 = load i32, ptr %13, align 4, !tbaa !11
  %39 = mul i32 %38, 10
  %40 = load i32, ptr %9, align 4, !tbaa !11
  %41 = sub i32 %40, %39
  store i32 %41, ptr %9, align 4, !tbaa !11
  %42 = load i32, ptr %9, align 4, !tbaa !11
  %43 = add i32 48, %42
  %44 = trunc i32 %43 to i8
  %45 = load i32, ptr %10, align 4, !tbaa !11
  %46 = add i32 %45, 1
  store i32 %46, ptr %10, align 4, !tbaa !11
  %47 = zext i32 %45 to i64
  %48 = getelementptr inbounds [10 x i8], ptr %12, i64 0, i64 %47
  store i8 %44, ptr %48, align 1, !tbaa !13
  %49 = load i32, ptr %11, align 4, !tbaa !11
  %50 = icmp eq i32 %49, 16
  br i1 %50, label %51, label %56

51:                                               ; preds = %35
  %52 = load i32, ptr %9, align 4, !tbaa !11
  %53 = icmp ugt i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %51
  %55 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %55, ptr %11, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %54, %51, %35
  %57 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %57, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %32, !llvm.loop !14

58:                                               ; preds = %32
  %59 = load i32, ptr %10, align 4, !tbaa !11
  %60 = icmp ugt i32 %59, 0
  br i1 %60, label %61, label %103

61:                                               ; preds = %58
  br label %62

62:                                               ; preds = %65, %61
  %63 = load i32, ptr %10, align 4, !tbaa !11
  %64 = icmp ugt i32 %63, 5
  br i1 %64, label %65, label %73

65:                                               ; preds = %62
  %66 = load i32, ptr %10, align 4, !tbaa !11
  %67 = add i32 %66, -1
  store i32 %67, ptr %10, align 4, !tbaa !11
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [10 x i8], ptr %12, i64 0, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !13
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i32 1
  store ptr %72, ptr %6, align 8, !tbaa !5
  store i8 %70, ptr %71, align 1, !tbaa !13
  br label %62, !llvm.loop !16

73:                                               ; preds = %62
  %74 = load i32, ptr %11, align 4, !tbaa !11
  %75 = icmp ule i32 %74, 5
  br i1 %75, label %76, label %102

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i32 1
  store ptr %78, ptr %6, align 8, !tbaa !5
  store i8 46, ptr %77, align 1, !tbaa !13
  store i32 5, ptr %14, align 4, !tbaa !11
  br label %79

79:                                               ; preds = %83, %76
  %80 = load i32, ptr %10, align 4, !tbaa !11
  %81 = load i32, ptr %14, align 4, !tbaa !11
  %82 = icmp ult i32 %80, %81
  br i1 %82, label %83, label %88

83:                                               ; preds = %79
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i32 1
  store ptr %85, ptr %6, align 8, !tbaa !5
  store i8 48, ptr %84, align 1, !tbaa !13
  %86 = load i32, ptr %14, align 4, !tbaa !11
  %87 = add i32 %86, -1
  store i32 %87, ptr %14, align 4, !tbaa !11
  br label %79, !llvm.loop !17

88:                                               ; preds = %79
  br label %89

89:                                               ; preds = %93, %88
  %90 = load i32, ptr %10, align 4, !tbaa !11
  %91 = load i32, ptr %11, align 4, !tbaa !11
  %92 = icmp uge i32 %90, %91
  br i1 %92, label %93, label %101

93:                                               ; preds = %89
  %94 = load i32, ptr %10, align 4, !tbaa !11
  %95 = add i32 %94, -1
  store i32 %95, ptr %10, align 4, !tbaa !11
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds [10 x i8], ptr %12, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !13
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i32 1
  store ptr %100, ptr %6, align 8, !tbaa !5
  store i8 %98, ptr %99, align 1, !tbaa !13
  br label %89, !llvm.loop !18

101:                                              ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %102

102:                                              ; preds = %101, %73
  br label %106

103:                                              ; preds = %58
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i32 1
  store ptr %105, ptr %6, align 8, !tbaa !5
  store i8 48, ptr %104, align 1, !tbaa !13
  br label %106

106:                                              ; preds = %103, %102
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  store i8 0, ptr %107, align 1, !tbaa !13
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 10, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %109

108:                                              ; preds = %28
  store i32 0, ptr %15, align 4
  br label %109

109:                                              ; preds = %108, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  %110 = load i32, ptr %15, align 4
  switch i32 %110, label %115 [
    i32 0, label %111
    i32 1, label %114
  ]

111:                                              ; preds = %109
  br label %112

112:                                              ; preds = %111, %4
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_error(ptr noundef %113, ptr noundef @.str.66) #4
  unreachable

114:                                              ; preds = %109
  ret void

115:                                              ; preds = %109
  unreachable
}

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

!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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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.66 = external hidden unnamed_addr constant [34 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

; Function Attrs: noreturn
declare void @png_error(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

; Function Attrs: nounwind uwtable
define dso_local void @png_ascii_from_fixed(ptr noalias noundef %0, ptr nocapture noundef writeonly %1, i64 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca [10 x i8], align 1
  %6 = icmp ugt i64 %2, 12
  br i1 %6, label %7, label %74

7:                                                ; preds = %4
  %8 = icmp slt i32 %3, 0
  br i1 %8, label %.thread, label %11

.thread:                                          ; preds = %7
  %9 = getelementptr inbounds i8, ptr %1, i64 1
  store i8 45, ptr %1, align 1, !tbaa !5
  %10 = sub nsw i32 0, %3
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %5) #5
  br label %.lr.ph.preheader

11:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %5) #5
  %.not48 = icmp eq i32 %3, 0
  br i1 %.not48, label %._crit_edge.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.thread, %11
  %.03579 = phi ptr [ %9, %.thread ], [ %1, %11 ]
  %.04178 = phi i32 [ %10, %.thread ], [ %3, %11 ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.03651 = phi i32 [ %spec.select, %.lr.ph ], [ 16, %.lr.ph.preheader ]
  %.03850 = phi i32 [ %16, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %.14249 = phi i32 [ %12, %.lr.ph ], [ %.04178, %.lr.ph.preheader ]
  %12 = udiv i32 %.14249, 10
  %.neg = mul i32 %12, -10
  %13 = add i32 %.neg, %.14249
  %14 = trunc i32 %13 to i8
  %15 = add i8 %14, 48
  %16 = add i32 %.03850, 1
  %17 = zext i32 %.03850 to i64
  %18 = getelementptr inbounds [10 x i8], ptr %5, i64 0, i64 %17
  store i8 %15, ptr %18, align 1, !tbaa !5
  %19 = icmp eq i32 %.03651, 16
  %20 = icmp ne i32 %13, 0
  %or.cond = and i1 %19, %20
  %spec.select = select i1 %or.cond, i32 %16, i32 %.03651
  %.not = icmp ult i32 %.14249, 10
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

._crit_edge:                                      ; preds = %.lr.ph
  %.not45 = icmp eq i32 %16, 0
  br i1 %.not45, label %._crit_edge.thread, label %.preheader47

.preheader47:                                     ; preds = %._crit_edge
  %21 = icmp ugt i32 %16, 5
  br i1 %21, label %.lr.ph55.preheader, label %._crit_edge56

.lr.ph55.preheader:                               ; preds = %.preheader47
  %22 = zext i32 %16 to i64
  %23 = add nsw i64 %22, -5
  %min.iters.check = icmp ult i64 %23, 32
  br i1 %min.iters.check, label %.lr.ph55.preheader125, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph55.preheader
  %n.vec = and i64 %23, -32
  %ind.end = sub nsw i64 %22, %n.vec
  %ind.end90 = getelementptr i8, ptr %.03579, i64 %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %next.gep = getelementptr i8, ptr %.03579, i64 %index
  %24 = xor i64 %index, -1
  %25 = add i64 %24, %22
  %26 = getelementptr inbounds [10 x i8], ptr %5, i64 0, i64 %25
  %27 = getelementptr inbounds i8, ptr %26, i64 -15
  %28 = getelementptr inbounds i8, ptr %26, i64 -31
  %wide.load = load <16 x i8>, ptr %27, align 1, !tbaa !5
  %reverse = shufflevector <16 x i8> %wide.load, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  %wide.load93 = load <16 x i8>, ptr %28, align 1, !tbaa !5
  %reverse94 = shufflevector <16 x i8> %wide.load93, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  %29 = getelementptr i8, ptr %next.gep, i64 16
  store <16 x i8> %reverse, ptr %next.gep, align 1, !tbaa !5
  store <16 x i8> %reverse94, ptr %29, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 32
  %30 = icmp eq i64 %index.next, %n.vec
  br i1 %30, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %23, %n.vec
  br i1 %cmp.n, label %._crit_edge56, label %.lr.ph55.preheader125

.lr.ph55.preheader125:                            ; preds = %middle.block, %.lr.ph55.preheader
  %indvars.iv.ph = phi i64 [ %22, %.lr.ph55.preheader ], [ %ind.end, %middle.block ]
  %.154.ph = phi ptr [ %.03579, %.lr.ph55.preheader ], [ %ind.end90, %middle.block ]
  br label %.lr.ph55

.lr.ph55:                                         ; preds = %.lr.ph55.preheader125, %.lr.ph55
  %indvars.iv = phi i64 [ %31, %.lr.ph55 ], [ %indvars.iv.ph, %.lr.ph55.preheader125 ]
  %.154 = phi ptr [ %34, %.lr.ph55 ], [ %.154.ph, %.lr.ph55.preheader125 ]
  %31 = add nsw i64 %indvars.iv, -1
  %32 = getelementptr inbounds [10 x i8], ptr %5, i64 0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %.154, i64 1
  store i8 %33, ptr %.154, align 1, !tbaa !5
  %.wide = icmp ugt i64 %31, 5
  br i1 %.wide, label %.lr.ph55, label %._crit_edge56, !llvm.loop !13

._crit_edge56:                                    ; preds = %.lr.ph55, %middle.block, %.preheader47
  %.139.lcssa = phi i32 [ %16, %.preheader47 ], [ 5, %middle.block ], [ 5, %.lr.ph55 ]
  %.1.lcssa = phi ptr [ %.03579, %.preheader47 ], [ %ind.end90, %middle.block ], [ %34, %.lr.ph55 ]
  %35 = icmp ult i32 %spec.select, 6
  br i1 %35, label %36, label %.loopexit

36:                                               ; preds = %._crit_edge56
  store i8 46, ptr %.1.lcssa, align 1, !tbaa !5
  %.259 = getelementptr i8, ptr %.1.lcssa, i64 1
  %37 = icmp ult i32 %.139.lcssa, 5
  br i1 %37, label %.lr.ph63.preheader, label %.preheader

.lr.ph63.preheader:                               ; preds = %36
  %38 = sub nuw nsw i32 4, %.139.lcssa
  %39 = zext nneg i32 %38 to i64
  %40 = add nuw nsw i64 %39, 1
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %.259, i8 48, i64 %40, i1 false), !tbaa !5
  %41 = add nuw nsw i64 %39, 2
  %scevgep = getelementptr i8, ptr %.1.lcssa, i64 %41
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph63.preheader, %36
  %.2.lcssa = phi ptr [ %.259, %36 ], [ %scevgep, %.lr.ph63.preheader ]
  %.not4665 = icmp ult i32 %.139.lcssa, %spec.select
  br i1 %.not4665, label %.loopexit, label %.lr.ph68.preheader

.lr.ph68.preheader:                               ; preds = %.preheader
  %42 = sub nsw i32 0, %spec.select
  %43 = sub nsw i32 0, %.139.lcssa
  %44 = tail call i32 @llvm.umax.i32(i32 %42, i32 %43)
  %45 = add i32 %44, %.139.lcssa
  %46 = zext i32 %45 to i64
  %47 = add nuw nsw i64 %46, 1
  %min.iters.check104 = icmp ult i32 %45, 47
  br i1 %min.iters.check104, label %.lr.ph68.preheader124, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph68.preheader
  %48 = add nsw i32 %spec.select, -1
  %49 = add nsw i32 %.139.lcssa, -1
  %umin = tail call i32 @llvm.umin.i32(i32 %48, i32 %49)
  %50 = xor i32 %umin, -1
  %51 = add i32 %.139.lcssa, %50
  %52 = icmp ugt i32 %51, %49
  br i1 %52, label %.lr.ph68.preheader124, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %scevgep95 = getelementptr i8, ptr %.2.lcssa, i64 1
  %53 = add nsw i32 %spec.select, -1
  %54 = add nsw i32 %.139.lcssa, -1
  %umin96 = tail call i32 @llvm.umin.i32(i32 %53, i32 %54)
  %55 = xor i32 %umin96, -1
  %56 = add i32 %.139.lcssa, %55
  %57 = zext i32 %56 to i64
  %scevgep97 = getelementptr i8, ptr %scevgep95, i64 %57
  %58 = zext i32 %54 to i64
  %59 = sub nsw i64 %58, %57
  %scevgep98 = getelementptr i8, ptr %5, i64 %59
  %scevgep99 = getelementptr inbounds i8, ptr %5, i64 1
  %scevgep100 = getelementptr i8, ptr %scevgep99, i64 %58
  %bound0 = icmp ult ptr %.2.lcssa, %scevgep100
  %bound1 = icmp ult ptr %scevgep98, %scevgep97
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph68.preheader124, label %vector.ph105

vector.ph105:                                     ; preds = %vector.memcheck
  %n.vec107 = and i64 %47, 8589934560
  %ind.end108 = getelementptr i8, ptr %.2.lcssa, i64 %n.vec107
  %.cast = trunc i64 %n.vec107 to i32
  %ind.end110 = sub i32 %.139.lcssa, %.cast
  br label %vector.body112

vector.body112:                                   ; preds = %vector.body112, %vector.ph105
  %index113 = phi i64 [ 0, %vector.ph105 ], [ %index.next122, %vector.body112 ]
  %next.gep114 = getelementptr i8, ptr %.2.lcssa, i64 %index113
  %.cast116 = trunc i64 %index113 to i32
  %60 = xor i32 %.cast116, -1
  %61 = add i32 %.139.lcssa, %60
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds [10 x i8], ptr %5, i64 0, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 -15
  %65 = getelementptr inbounds i8, ptr %63, i64 -31
  %wide.load118 = load <16 x i8>, ptr %64, align 1, !tbaa !5, !alias.scope !14
  %reverse119 = shufflevector <16 x i8> %wide.load118, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  %wide.load120 = load <16 x i8>, ptr %65, align 1, !tbaa !5, !alias.scope !14
  %reverse121 = shufflevector <16 x i8> %wide.load120, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  %66 = getelementptr i8, ptr %next.gep114, i64 16
  store <16 x i8> %reverse119, ptr %next.gep114, align 1, !tbaa !5, !alias.scope !17, !noalias !14
  store <16 x i8> %reverse121, ptr %66, align 1, !tbaa !5, !alias.scope !17, !noalias !14
  %index.next122 = add nuw i64 %index113, 32
  %67 = icmp eq i64 %index.next122, %n.vec107
  br i1 %67, label %middle.block102, label %vector.body112, !llvm.loop !19

middle.block102:                                  ; preds = %vector.body112
  %cmp.n123 = icmp eq i64 %47, %n.vec107
  br i1 %cmp.n123, label %.loopexit, label %.lr.ph68.preheader124

.lr.ph68.preheader124:                            ; preds = %middle.block102, %vector.memcheck, %vector.scevcheck, %.lr.ph68.preheader
  %.367.ph = phi ptr [ %.2.lcssa, %vector.memcheck ], [ %.2.lcssa, %vector.scevcheck ], [ %.2.lcssa, %.lr.ph68.preheader ], [ %ind.end108, %middle.block102 ]
  %.24066.ph = phi i32 [ %.139.lcssa, %vector.memcheck ], [ %.139.lcssa, %vector.scevcheck ], [ %.139.lcssa, %.lr.ph68.preheader ], [ %ind.end110, %middle.block102 ]
  br label %.lr.ph68

.lr.ph68:                                         ; preds = %.lr.ph68.preheader124, %.lr.ph68
  %.367 = phi ptr [ %72, %.lr.ph68 ], [ %.367.ph, %.lr.ph68.preheader124 ]
  %.24066 = phi i32 [ %68, %.lr.ph68 ], [ %.24066.ph, %.lr.ph68.preheader124 ]
  %68 = add i32 %.24066, -1
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds [10 x i8], ptr %5, i64 0, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %.367, i64 1
  store i8 %71, ptr %.367, align 1, !tbaa !5
  %.not46 = icmp ult i32 %68, %spec.select
  br i1 %.not46, label %.loopexit, label %.lr.ph68, !llvm.loop !20

._crit_edge.thread:                               ; preds = %11, %._crit_edge
  %.0358085 = phi ptr [ %.03579, %._crit_edge ], [ %1, %11 ]
  %73 = getelementptr inbounds i8, ptr %.0358085, i64 1
  store i8 48, ptr %.0358085, align 1, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph68, %middle.block102, %.preheader, %._crit_edge56, %._crit_edge.thread
  %.4 = phi ptr [ %.1.lcssa, %._crit_edge56 ], [ %73, %._crit_edge.thread ], [ %.2.lcssa, %.preheader ], [ %ind.end108, %middle.block102 ], [ %72, %.lr.ph68 ]
  store i8 0, ptr %.4, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %5) #5
  ret void

74:                                               ; preds = %4
  tail call void @png_error(ptr noundef %0, ptr noundef nonnull @.str.66) #6
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "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: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9, !11, !12}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !9, !12, !11}
!14 = !{!15}
!15 = distinct !{!15, !16}
!16 = distinct !{!16, !"LVerDomain"}
!17 = !{!18}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !9, !11, !12}
!20 = distinct !{!20, !9, !11}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass