; LLVM IR from niessner/Matterport :: code/gaps/pkgs/png (pngwtran)

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

; Function Attrs: nounwind uwtable
define dso_local void @png_do_write_swap_alpha(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [2 x i8], align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca [2 x i8], align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.png_row_info_struct, ptr %25, i32 0, i32 2
  %27 = load i8, ptr %26, align 8, !tbaa !9
  %28 = zext i8 %27 to i32
  %29 = icmp eq i32 %28, 6
  br i1 %29, label %30, label %132

30:                                               ; preds = %2
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.png_row_info_struct, ptr %31, i32 0, i32 3
  %33 = load i8, ptr %32, align 1, !tbaa !13
  %34 = zext i8 %33 to i32
  %35 = icmp eq i32 %34, 8
  br i1 %35, label %36, label %71

36:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.png_row_info_struct, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !14
  store i32 %39, ptr %8, align 4, !tbaa !15
  store i32 0, ptr %7, align 4, !tbaa !15
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %40, ptr %6, align 8, !tbaa !5
  store ptr %40, ptr %5, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %67, %36
  %42 = load i32, ptr %7, align 4, !tbaa !15
  %43 = load i32, ptr %8, align 4, !tbaa !15
  %44 = icmp ult i32 %42, %43
  br i1 %44, label %45, label %70

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #2
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i32 1
  store ptr %47, ptr %5, align 8, !tbaa !5
  %48 = load i8, ptr %46, align 1, !tbaa !16
  store i8 %48, ptr %9, align 1, !tbaa !16
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i32 1
  store ptr %50, ptr %5, align 8, !tbaa !5
  %51 = load i8, ptr %49, align 1, !tbaa !16
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i32 1
  store ptr %53, ptr %6, align 8, !tbaa !5
  store i8 %51, ptr %52, align 1, !tbaa !16
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i32 1
  store ptr %55, ptr %5, align 8, !tbaa !5
  %56 = load i8, ptr %54, align 1, !tbaa !16
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %57, i32 1
  store ptr %58, ptr %6, align 8, !tbaa !5
  store i8 %56, ptr %57, align 1, !tbaa !16
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i32 1
  store ptr %60, ptr %5, align 8, !tbaa !5
  %61 = load i8, ptr %59, align 1, !tbaa !16
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i32 1
  store ptr %63, ptr %6, align 8, !tbaa !5
  store i8 %61, ptr %62, align 1, !tbaa !16
  %64 = load i8, ptr %9, align 1, !tbaa !16
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i32 1
  store ptr %66, ptr %6, align 8, !tbaa !5
  store i8 %64, ptr %65, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #2
  br label %67

67:                                               ; preds = %45
  %68 = load i32, ptr %7, align 4, !tbaa !15
  %69 = add i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !15
  br label %41, !llvm.loop !17

70:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  br label %131

71:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.png_row_info_struct, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !14
  store i32 %74, ptr %13, align 4, !tbaa !15
  store i32 0, ptr %12, align 4, !tbaa !15
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %75, ptr %11, align 8, !tbaa !5
  store ptr %75, ptr %10, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %127, %71
  %77 = load i32, ptr %12, align 4, !tbaa !15
  %78 = load i32, ptr %13, align 4, !tbaa !15
  %79 = icmp ult i32 %77, %78
  br i1 %79, label %80, label %130

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #2
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i32 1
  store ptr %82, ptr %10, align 8, !tbaa !5
  %83 = load i8, ptr %81, align 1, !tbaa !16
  %84 = getelementptr inbounds [2 x i8], ptr %14, i64 0, i64 0
  store i8 %83, ptr %84, align 1, !tbaa !16
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i32 1
  store ptr %86, ptr %10, align 8, !tbaa !5
  %87 = load i8, ptr %85, align 1, !tbaa !16
  %88 = getelementptr inbounds [2 x i8], ptr %14, i64 0, i64 1
  store i8 %87, ptr %88, align 1, !tbaa !16
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %10, align 8, !tbaa !5
  %91 = load i8, ptr %89, align 1, !tbaa !16
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i32 1
  store ptr %93, ptr %11, align 8, !tbaa !5
  store i8 %91, ptr %92, align 1, !tbaa !16
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i32 1
  store ptr %95, ptr %10, align 8, !tbaa !5
  %96 = load i8, ptr %94, align 1, !tbaa !16
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i32 1
  store ptr %98, ptr %11, align 8, !tbaa !5
  store i8 %96, ptr %97, align 1, !tbaa !16
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i32 1
  store ptr %100, ptr %10, align 8, !tbaa !5
  %101 = load i8, ptr %99, align 1, !tbaa !16
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i32 1
  store ptr %103, ptr %11, align 8, !tbaa !5
  store i8 %101, ptr %102, align 1, !tbaa !16
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i32 1
  store ptr %105, ptr %10, align 8, !tbaa !5
  %106 = load i8, ptr %104, align 1, !tbaa !16
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i32 1
  store ptr %108, ptr %11, align 8, !tbaa !5
  store i8 %106, ptr %107, align 1, !tbaa !16
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i32 1
  store ptr %110, ptr %10, align 8, !tbaa !5
  %111 = load i8, ptr %109, align 1, !tbaa !16
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i32 1
  store ptr %113, ptr %11, align 8, !tbaa !5
  store i8 %111, ptr %112, align 1, !tbaa !16
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %114, i32 1
  store ptr %115, ptr %10, align 8, !tbaa !5
  %116 = load i8, ptr %114, align 1, !tbaa !16
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i32 1
  store ptr %118, ptr %11, align 8, !tbaa !5
  store i8 %116, ptr %117, align 1, !tbaa !16
  %119 = getelementptr inbounds [2 x i8], ptr %14, i64 0, i64 0
  %120 = load i8, ptr %119, align 1, !tbaa !16
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i32 1
  store ptr %122, ptr %11, align 8, !tbaa !5
  store i8 %120, ptr %121, align 1, !tbaa !16
  %123 = getelementptr inbounds [2 x i8], ptr %14, i64 0, i64 1
  %124 = load i8, ptr %123, align 1, !tbaa !16
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %125, i32 1
  store ptr %126, ptr %11, align 8, !tbaa !5
  store i8 %124, ptr %125, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #2
  br label %127

127:                                              ; preds = %80
  %128 = load i32, ptr %12, align 4, !tbaa !15
  %129 = add i32 %128, 1
  store i32 %129, ptr %12, align 4, !tbaa !15
  br label %76, !llvm.loop !19

130:                                              ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  br label %131

131:                                              ; preds = %130, %70
  br label %211

132:                                              ; preds = %2
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.png_row_info_struct, ptr %133, i32 0, i32 2
  %135 = load i8, ptr %134, align 8, !tbaa !9
  %136 = zext i8 %135 to i32
  %137 = icmp eq i32 %136, 4
  br i1 %137, label %138, label %210

138:                                              ; preds = %132
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.png_row_info_struct, ptr %139, i32 0, i32 3
  %141 = load i8, ptr %140, align 1, !tbaa !13
  %142 = zext i8 %141 to i32
  %143 = icmp eq i32 %142, 8
  br i1 %143, label %144, label %169

144:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.png_row_info_struct, ptr %145, i32 0, i32 0
  %147 = load i32, ptr %146, align 8, !tbaa !14
  store i32 %147, ptr %18, align 4, !tbaa !15
  store i32 0, ptr %17, align 4, !tbaa !15
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %148, ptr %16, align 8, !tbaa !5
  store ptr %148, ptr %15, align 8, !tbaa !5
  br label %149

149:                                              ; preds = %165, %144
  %150 = load i32, ptr %17, align 4, !tbaa !15
  %151 = load i32, ptr %18, align 4, !tbaa !15
  %152 = icmp ult i32 %150, %151
  br i1 %152, label %153, label %168

153:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #2
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = getelementptr inbounds i8, ptr %154, i32 1
  store ptr %155, ptr %15, align 8, !tbaa !5
  %156 = load i8, ptr %154, align 1, !tbaa !16
  store i8 %156, ptr %19, align 1, !tbaa !16
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = getelementptr inbounds i8, ptr %157, i32 1
  store ptr %158, ptr %15, align 8, !tbaa !5
  %159 = load i8, ptr %157, align 1, !tbaa !16
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  %161 = getelementptr inbounds i8, ptr %160, i32 1
  store ptr %161, ptr %16, align 8, !tbaa !5
  store i8 %159, ptr %160, align 1, !tbaa !16
  %162 = load i8, ptr %19, align 1, !tbaa !16
  %163 = load ptr, ptr %16, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i32 1
  store ptr %164, ptr %16, align 8, !tbaa !5
  store i8 %162, ptr %163, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #2
  br label %165

165:                                              ; preds = %153
  %166 = load i32, ptr %17, align 4, !tbaa !15
  %167 = add i32 %166, 1
  store i32 %167, ptr %17, align 4, !tbaa !15
  br label %149, !llvm.loop !20

168:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  br label %209

169:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #2
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.png_row_info_struct, ptr %170, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !14
  store i32 %172, ptr %23, align 4, !tbaa !15
  store i32 0, ptr %22, align 4, !tbaa !15
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %173, ptr %21, align 8, !tbaa !5
  store ptr %173, ptr %20, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %205, %169
  %175 = load i32, ptr %22, align 4, !tbaa !15
  %176 = load i32, ptr %23, align 4, !tbaa !15
  %177 = icmp ult i32 %175, %176
  br i1 %177, label %178, label %208

178:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #2
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = getelementptr inbounds i8, ptr %179, i32 1
  store ptr %180, ptr %20, align 8, !tbaa !5
  %181 = load i8, ptr %179, align 1, !tbaa !16
  %182 = getelementptr inbounds [2 x i8], ptr %24, i64 0, i64 0
  store i8 %181, ptr %182, align 1, !tbaa !16
  %183 = load ptr, ptr %20, align 8, !tbaa !5
  %184 = getelementptr inbounds i8, ptr %183, i32 1
  store ptr %184, ptr %20, align 8, !tbaa !5
  %185 = load i8, ptr %183, align 1, !tbaa !16
  %186 = getelementptr inbounds [2 x i8], ptr %24, i64 0, i64 1
  store i8 %185, ptr %186, align 1, !tbaa !16
  %187 = load ptr, ptr %20, align 8, !tbaa !5
  %188 = getelementptr inbounds i8, ptr %187, i32 1
  store ptr %188, ptr %20, align 8, !tbaa !5
  %189 = load i8, ptr %187, align 1, !tbaa !16
  %190 = load ptr, ptr %21, align 8, !tbaa !5
  %191 = getelementptr inbounds i8, ptr %190, i32 1
  store ptr %191, ptr %21, align 8, !tbaa !5
  store i8 %189, ptr %190, align 1, !tbaa !16
  %192 = load ptr, ptr %20, align 8, !tbaa !5
  %193 = getelementptr inbounds i8, ptr %192, i32 1
  store ptr %193, ptr %20, align 8, !tbaa !5
  %194 = load i8, ptr %192, align 1, !tbaa !16
  %195 = load ptr, ptr %21, align 8, !tbaa !5
  %196 = getelementptr inbounds i8, ptr %195, i32 1
  store ptr %196, ptr %21, align 8, !tbaa !5
  store i8 %194, ptr %195, align 1, !tbaa !16
  %197 = getelementptr inbounds [2 x i8], ptr %24, i64 0, i64 0
  %198 = load i8, ptr %197, align 1, !tbaa !16
  %199 = load ptr, ptr %21, align 8, !tbaa !5
  %200 = getelementptr inbounds i8, ptr %199, i32 1
  store ptr %200, ptr %21, align 8, !tbaa !5
  store i8 %198, ptr %199, align 1, !tbaa !16
  %201 = getelementptr inbounds [2 x i8], ptr %24, i64 0, i64 1
  %202 = load i8, ptr %201, align 1, !tbaa !16
  %203 = load ptr, ptr %21, align 8, !tbaa !5
  %204 = getelementptr inbounds i8, ptr %203, i32 1
  store ptr %204, ptr %21, align 8, !tbaa !5
  store i8 %202, ptr %203, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #2
  br label %205

205:                                              ; preds = %178
  %206 = load i32, ptr %22, align 4, !tbaa !15
  %207 = add i32 %206, 1
  store i32 %207, ptr %22, align 4, !tbaa !15
  br label %174, !llvm.loop !21

208:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #2
  br label %209

209:                                              ; preds = %208, %168
  br label %210

210:                                              ; preds = %209, %132
  br label %211

211:                                              ; preds = %210, %131
  ret void
}

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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


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

; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @png_do_write_swap_alpha(ptr nocapture noundef readonly %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = load i8, ptr %3, align 8, !tbaa !5
  switch i8 %4, label %.loopexit [
    i8 6, label %5
    i8 4, label %32
  ]

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

10:                                               ; preds = %5
  br i1 %.not95, label %.loopexit, label %.lr.ph92.preheader

.lr.ph92.preheader:                               ; preds = %10
  %xtraiter121 = and i32 %9, 3
  %11 = icmp ult i32 %9, 4
  br i1 %11, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph92.preheader.new

.lr.ph92.preheader.new:                           ; preds = %.lr.ph92.preheader
  %unroll_iter124 = and i32 %9, -4
  br label %.lr.ph92

.lr.ph92:                                         ; preds = %.lr.ph92, %.lr.ph92.preheader.new
  %.091 = phi ptr [ %1, %.lr.ph92.preheader.new ], [ %21, %.lr.ph92 ]
  %niter125 = phi i32 [ 0, %.lr.ph92.preheader.new ], [ %niter125.next.3, %.lr.ph92 ]
  %12 = getelementptr i8, ptr %.091, i64 4
  %13 = load <4 x i8>, ptr %.091, align 1, !tbaa !13
  %14 = shufflevector <4 x i8> %13, <4 x i8> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>
  store <4 x i8> %14, ptr %.091, align 1, !tbaa !13
  %15 = getelementptr i8, ptr %.091, i64 8
  %16 = load <4 x i8>, ptr %12, align 1, !tbaa !13
  %17 = shufflevector <4 x i8> %16, <4 x i8> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>
  store <4 x i8> %17, ptr %12, align 1, !tbaa !13
  %18 = getelementptr i8, ptr %.091, i64 12
  %19 = load <4 x i8>, ptr %15, align 1, !tbaa !13
  %20 = shufflevector <4 x i8> %19, <4 x i8> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>
  store <4 x i8> %20, ptr %15, align 1, !tbaa !13
  %21 = getelementptr i8, ptr %.091, i64 16
  %22 = load <4 x i8>, ptr %18, align 1, !tbaa !13
  %23 = shufflevector <4 x i8> %22, <4 x i8> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>
  store <4 x i8> %23, ptr %18, align 1, !tbaa !13
  %niter125.next.3 = add i32 %niter125, 4
  %niter125.ncmp.3 = icmp eq i32 %niter125.next.3, %unroll_iter124
  br i1 %niter125.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph92, !llvm.loop !14

24:                                               ; preds = %5
  br i1 %.not95, label %.loopexit, label %.lr.ph88.preheader

.lr.ph88.preheader:                               ; preds = %24
  %xtraiter116 = and i32 %9, 1
  %25 = icmp eq i32 %9, 1
  br i1 %25, label %.loopexit.loopexit108.unr-lcssa, label %.lr.ph88.preheader.new

.lr.ph88.preheader.new:                           ; preds = %.lr.ph88.preheader
  %unroll_iter119 = and i32 %9, -2
  br label %.lr.ph88

.lr.ph88:                                         ; preds = %.lr.ph88, %.lr.ph88.preheader.new
  %.06887 = phi ptr [ %1, %.lr.ph88.preheader.new ], [ %29, %.lr.ph88 ]
  %niter120 = phi i32 [ 0, %.lr.ph88.preheader.new ], [ %niter120.next.1, %.lr.ph88 ]
  %26 = getelementptr i8, ptr %.06887, i64 8
  %27 = load <8 x i8>, ptr %.06887, align 1, !tbaa !13
  %28 = shufflevector <8 x i8> %27, <8 x i8> poison, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1>
  store <8 x i8> %28, ptr %.06887, align 1, !tbaa !13
  %29 = getelementptr i8, ptr %.06887, i64 16
  %30 = load <8 x i8>, ptr %26, align 1, !tbaa !13
  %31 = shufflevector <8 x i8> %30, <8 x i8> poison, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1>
  store <8 x i8> %31, ptr %26, align 1, !tbaa !13
  %niter120.next.1 = add i32 %niter120, 2
  %niter120.ncmp.1 = icmp eq i32 %niter120.next.1, %unroll_iter119
  br i1 %niter120.ncmp.1, label %.loopexit.loopexit108.unr-lcssa, label %.lr.ph88, !llvm.loop !16

32:                                               ; preds = %2
  %33 = getelementptr inbounds i8, ptr %0, i64 17
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = icmp eq i8 %34, 8
  %36 = load i32, ptr %0, align 8, !tbaa !12
  %.not93 = icmp eq i32 %36, 0
  br i1 %35, label %37, label %55

37:                                               ; preds = %32
  br i1 %.not93, label %.loopexit, label %.lr.ph84.preheader

.lr.ph84.preheader:                               ; preds = %37
  %xtraiter111 = and i32 %36, 3
  %38 = icmp ult i32 %36, 4
  br i1 %38, label %.loopexit.loopexit109.unr-lcssa, label %.lr.ph84.preheader.new

.lr.ph84.preheader.new:                           ; preds = %.lr.ph84.preheader
  %unroll_iter114 = and i32 %36, -4
  br label %.lr.ph84

.lr.ph84:                                         ; preds = %.lr.ph84, %.lr.ph84.preheader.new
  %.07182 = phi ptr [ %1, %.lr.ph84.preheader.new ], [ %53, %.lr.ph84 ]
  %niter115 = phi i32 [ 0, %.lr.ph84.preheader.new ], [ %niter115.next.3, %.lr.ph84 ]
  %39 = getelementptr inbounds i8, ptr %.07182, i64 1
  %40 = load i8, ptr %.07182, align 1, !tbaa !13
  %41 = getelementptr i8, ptr %.07182, i64 2
  %42 = load i8, ptr %39, align 1, !tbaa !13
  store i8 %42, ptr %.07182, align 1, !tbaa !13
  store i8 %40, ptr %39, align 1, !tbaa !13
  %43 = getelementptr i8, ptr %.07182, i64 3
  %44 = load i8, ptr %41, align 1, !tbaa !13
  %45 = getelementptr i8, ptr %.07182, i64 4
  %46 = load i8, ptr %43, align 1, !tbaa !13
  store i8 %46, ptr %41, align 1, !tbaa !13
  store i8 %44, ptr %43, align 1, !tbaa !13
  %47 = getelementptr i8, ptr %.07182, i64 5
  %48 = load i8, ptr %45, align 1, !tbaa !13
  %49 = getelementptr i8, ptr %.07182, i64 6
  %50 = load i8, ptr %47, align 1, !tbaa !13
  store i8 %50, ptr %45, align 1, !tbaa !13
  store i8 %48, ptr %47, align 1, !tbaa !13
  %51 = getelementptr i8, ptr %.07182, i64 7
  %52 = load i8, ptr %49, align 1, !tbaa !13
  %53 = getelementptr i8, ptr %.07182, i64 8
  %54 = load i8, ptr %51, align 1, !tbaa !13
  store i8 %54, ptr %49, align 1, !tbaa !13
  store i8 %52, ptr %51, align 1, !tbaa !13
  %niter115.next.3 = add i32 %niter115, 4
  %niter115.ncmp.3 = icmp eq i32 %niter115.next.3, %unroll_iter114
  br i1 %niter115.ncmp.3, label %.loopexit.loopexit109.unr-lcssa, label %.lr.ph84, !llvm.loop !17

55:                                               ; preds = %32
  br i1 %.not93, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %55
  %xtraiter = and i32 %36, 3
  %56 = icmp ult i32 %36, 4
  br i1 %56, label %.loopexit.loopexit110.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %36, -4
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.06679 = phi ptr [ %1, %.lr.ph.preheader.new ], [ %66, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %57 = getelementptr i8, ptr %.06679, i64 4
  %58 = load <4 x i8>, ptr %.06679, align 1, !tbaa !13
  %59 = shufflevector <4 x i8> %58, <4 x i8> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
  store <4 x i8> %59, ptr %.06679, align 1, !tbaa !13
  %60 = getelementptr i8, ptr %.06679, i64 8
  %61 = load <4 x i8>, ptr %57, align 1, !tbaa !13
  %62 = shufflevector <4 x i8> %61, <4 x i8> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
  store <4 x i8> %62, ptr %57, align 1, !tbaa !13
  %63 = getelementptr i8, ptr %.06679, i64 12
  %64 = load <4 x i8>, ptr %60, align 1, !tbaa !13
  %65 = shufflevector <4 x i8> %64, <4 x i8> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
  store <4 x i8> %65, ptr %60, align 1, !tbaa !13
  %66 = getelementptr i8, ptr %.06679, i64 16
  %67 = load <4 x i8>, ptr %63, align 1, !tbaa !13
  %68 = shufflevector <4 x i8> %67, <4 x i8> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
  store <4 x i8> %68, ptr %63, align 1, !tbaa !13
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit110.unr-lcssa, label %.lr.ph, !llvm.loop !18

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph92, %.lr.ph92.preheader
  %.091.unr = phi ptr [ %1, %.lr.ph92.preheader ], [ %21, %.lr.ph92 ]
  %lcmp.mod123.not = icmp eq i32 %xtraiter121, 0
  br i1 %lcmp.mod123.not, label %.loopexit, label %.lr.ph92.epil

.lr.ph92.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph92.epil
  %.091.epil = phi ptr [ %69, %.lr.ph92.epil ], [ %.091.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter122 = phi i32 [ %epil.iter122.next, %.lr.ph92.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %69 = getelementptr i8, ptr %.091.epil, i64 4
  %70 = load <4 x i8>, ptr %.091.epil, align 1, !tbaa !13
  %71 = shufflevector <4 x i8> %70, <4 x i8> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>
  store <4 x i8> %71, ptr %.091.epil, align 1, !tbaa !13
  %epil.iter122.next = add i32 %epil.iter122, 1
  %epil.iter122.cmp.not = icmp eq i32 %epil.iter122.next, %xtraiter121
  br i1 %epil.iter122.cmp.not, label %.loopexit, label %.lr.ph92.epil, !llvm.loop !19

.loopexit.loopexit108.unr-lcssa:                  ; preds = %.lr.ph88, %.lr.ph88.preheader
  %.06887.unr = phi ptr [ %1, %.lr.ph88.preheader ], [ %29, %.lr.ph88 ]
  %lcmp.mod118.not = icmp eq i32 %xtraiter116, 0
  br i1 %lcmp.mod118.not, label %.loopexit, label %.lr.ph88.epil

.lr.ph88.epil:                                    ; preds = %.loopexit.loopexit108.unr-lcssa
  %72 = load <8 x i8>, ptr %.06887.unr, align 1, !tbaa !13
  %73 = shufflevector <8 x i8> %72, <8 x i8> poison, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1>
  store <8 x i8> %73, ptr %.06887.unr, align 1, !tbaa !13
  br label %.loopexit

.loopexit.loopexit109.unr-lcssa:                  ; preds = %.lr.ph84, %.lr.ph84.preheader
  %.07182.unr = phi ptr [ %1, %.lr.ph84.preheader ], [ %53, %.lr.ph84 ]
  %lcmp.mod113.not = icmp eq i32 %xtraiter111, 0
  br i1 %lcmp.mod113.not, label %.loopexit, label %.lr.ph84.epil

.lr.ph84.epil:                                    ; preds = %.loopexit.loopexit109.unr-lcssa, %.lr.ph84.epil
  %.07182.epil = phi ptr [ %76, %.lr.ph84.epil ], [ %.07182.unr, %.loopexit.loopexit109.unr-lcssa ]
  %epil.iter112 = phi i32 [ %epil.iter112.next, %.lr.ph84.epil ], [ 0, %.loopexit.loopexit109.unr-lcssa ]
  %74 = getelementptr inbounds i8, ptr %.07182.epil, i64 1
  %75 = load i8, ptr %.07182.epil, align 1, !tbaa !13
  %76 = getelementptr i8, ptr %.07182.epil, i64 2
  %77 = load i8, ptr %74, align 1, !tbaa !13
  store i8 %77, ptr %.07182.epil, align 1, !tbaa !13
  store i8 %75, ptr %74, align 1, !tbaa !13
  %epil.iter112.next = add i32 %epil.iter112, 1
  %epil.iter112.cmp.not = icmp eq i32 %epil.iter112.next, %xtraiter111
  br i1 %epil.iter112.cmp.not, label %.loopexit, label %.lr.ph84.epil, !llvm.loop !21

.loopexit.loopexit110.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %.06679.unr = phi ptr [ %1, %.lr.ph.preheader ], [ %66, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.loopexit.loopexit110.unr-lcssa, %.lr.ph.epil
  %.06679.epil = phi ptr [ %78, %.lr.ph.epil ], [ %.06679.unr, %.loopexit.loopexit110.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.loopexit.loopexit110.unr-lcssa ]
  %78 = getelementptr i8, ptr %.06679.epil, i64 4
  %79 = load <4 x i8>, ptr %.06679.epil, align 1, !tbaa !13
  %80 = shufflevector <4 x i8> %79, <4 x i8> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
  store <4 x i8> %80, ptr %.06679.epil, align 1, !tbaa !13
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph.epil, !llvm.loop !22

.loopexit:                                        ; preds = %.loopexit.loopexit110.unr-lcssa, %.lr.ph.epil, %.loopexit.loopexit109.unr-lcssa, %.lr.ph84.epil, %.lr.ph88.epil, %.loopexit.loopexit108.unr-lcssa, %.loopexit.loopexit.unr-lcssa, %.lr.ph92.epil, %55, %37, %24, %10, %2
  ret void
}

attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) 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" }

!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, !8, i64 16}
!6 = !{!"png_row_info_struct", !7, i64 0, !10, i64 8, !8, i64 16, !8, i64 17, !8, i64 18, !8, i64 19}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !8, i64 17}
!12 = !{!6, !7, i64 0}
!13 = !{!8, !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass