; LLVM IR from corentinartaud/graphics :: ThirdParty/FreeImage-3170/Source/LibJPEG (transupp)

; 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.jpeg_transform_info = type { i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.jpeg_decompress_struct = type { ptr, ptr, ptr, ptr, i8, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, i8, i8, i32, i8, i8, i8, i32, i8, i32, i8, i8, i8, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i8, i8, i8, [16 x i8], [16 x i8], [16 x i8], i32, i8, i8, i8, i8, i16, i16, i8, i8, i32, i8, ptr, i32, i32, i32, i32, i32, ptr, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

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

; 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 @jtransform_execute_transform(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %10 = load ptr, ptr %8, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.jpeg_transform_info, ptr %10, i32 0, i32 14
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  store ptr %12, ptr %9, align 8, !tbaa !5
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.jpeg_transform_info, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !12
  switch i32 %15, label %172 [
    i32 0, label %16
    i32 1, label %66
    i32 2, label %90
    i32 3, label %101
    i32 4, label %112
    i32 5, label %123
    i32 6, label %134
    i32 7, label %145
    i32 8, label %156
  ]

16:                                               ; preds = %4
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.jpeg_transform_info, ptr %17, i32 0, i32 15
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %20, i32 0, i32 27
  %22 = load i32, ptr %21, align 4, !tbaa !14
  %23 = icmp ugt i32 %19, %22
  br i1 %23, label %32, label %24

24:                                               ; preds = %16
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.jpeg_transform_info, ptr %25, i32 0, i32 16
  %27 = load i32, ptr %26, align 4, !tbaa !18
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %28, i32 0, i32 28
  %30 = load i32, ptr %29, align 8, !tbaa !19
  %31 = icmp ugt i32 %27, %30
  br i1 %31, label %32, label %43

32:                                               ; preds = %24, %16
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.jpeg_transform_info, ptr %35, i32 0, i32 17
  %37 = load i32, ptr %36, align 8, !tbaa !20
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.jpeg_transform_info, ptr %38, i32 0, i32 18
  %40 = load i32, ptr %39, align 4, !tbaa !21
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_crop_ext(ptr noundef %33, ptr noundef %34, i32 noundef %37, i32 noundef %40, ptr noundef %41, ptr noundef %42)
  br label %65

43:                                               ; preds = %24
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.jpeg_transform_info, ptr %44, i32 0, i32 17
  %46 = load i32, ptr %45, align 8, !tbaa !20
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %53, label %48

48:                                               ; preds = %43
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.jpeg_transform_info, ptr %49, i32 0, i32 18
  %51 = load i32, ptr %50, align 4, !tbaa !21
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %64

53:                                               ; preds = %48, %43
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.jpeg_transform_info, ptr %56, i32 0, i32 17
  %58 = load i32, ptr %57, align 8, !tbaa !20
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.jpeg_transform_info, ptr %59, i32 0, i32 18
  %61 = load i32, ptr %60, align 4, !tbaa !21
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_crop(ptr noundef %54, ptr noundef %55, i32 noundef %58, i32 noundef %61, ptr noundef %62, ptr noundef %63)
  br label %64

64:                                               ; preds = %53, %48
  br label %65

65:                                               ; preds = %64, %32
  br label %172

66:                                               ; preds = %4
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.jpeg_transform_info, ptr %67, i32 0, i32 18
  %69 = load i32, ptr %68, align 4, !tbaa !21
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %82

71:                                               ; preds = %66
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.jpeg_transform_info, ptr %74, i32 0, i32 17
  %76 = load i32, ptr %75, align 8, !tbaa !20
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.jpeg_transform_info, ptr %77, i32 0, i32 18
  %79 = load i32, ptr %78, align 4, !tbaa !21
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_flip_h(ptr noundef %72, ptr noundef %73, i32 noundef %76, i32 noundef %79, ptr noundef %80, ptr noundef %81)
  br label %89

82:                                               ; preds = %66
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.jpeg_transform_info, ptr %85, i32 0, i32 17
  %87 = load i32, ptr %86, align 8, !tbaa !20
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  call void @do_flip_h_no_crop(ptr noundef %83, ptr noundef %84, i32 noundef %87, ptr noundef %88)
  br label %89

89:                                               ; preds = %82, %71
  br label %172

90:                                               ; preds = %4
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.jpeg_transform_info, ptr %93, i32 0, i32 17
  %95 = load i32, ptr %94, align 8, !tbaa !20
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.jpeg_transform_info, ptr %96, i32 0, i32 18
  %98 = load i32, ptr %97, align 4, !tbaa !21
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_flip_v(ptr noundef %91, ptr noundef %92, i32 noundef %95, i32 noundef %98, ptr noundef %99, ptr noundef %100)
  br label %172

101:                                              ; preds = %4
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.jpeg_transform_info, ptr %104, i32 0, i32 17
  %106 = load i32, ptr %105, align 8, !tbaa !20
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.jpeg_transform_info, ptr %107, i32 0, i32 18
  %109 = load i32, ptr %108, align 4, !tbaa !21
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_transpose(ptr noundef %102, ptr noundef %103, i32 noundef %106, i32 noundef %109, ptr noundef %110, ptr noundef %111)
  br label %172

112:                                              ; preds = %4
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.jpeg_transform_info, ptr %115, i32 0, i32 17
  %117 = load i32, ptr %116, align 8, !tbaa !20
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.jpeg_transform_info, ptr %118, i32 0, i32 18
  %120 = load i32, ptr %119, align 4, !tbaa !21
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_transverse(ptr noundef %113, ptr noundef %114, i32 noundef %117, i32 noundef %120, ptr noundef %121, ptr noundef %122)
  br label %172

123:                                              ; preds = %4
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.jpeg_transform_info, ptr %126, i32 0, i32 17
  %128 = load i32, ptr %127, align 8, !tbaa !20
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.jpeg_transform_info, ptr %129, i32 0, i32 18
  %131 = load i32, ptr %130, align 4, !tbaa !21
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_rot_90(ptr noundef %124, ptr noundef %125, i32 noundef %128, i32 noundef %131, ptr noundef %132, ptr noundef %133)
  br label %172

134:                                              ; preds = %4
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.jpeg_transform_info, ptr %137, i32 0, i32 17
  %139 = load i32, ptr %138, align 8, !tbaa !20
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.jpeg_transform_info, ptr %140, i32 0, i32 18
  %142 = load i32, ptr %141, align 4, !tbaa !21
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_rot_180(ptr noundef %135, ptr noundef %136, i32 noundef %139, i32 noundef %142, ptr noundef %143, ptr noundef %144)
  br label %172

145:                                              ; preds = %4
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.jpeg_transform_info, ptr %148, i32 0, i32 17
  %150 = load i32, ptr %149, align 8, !tbaa !20
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.jpeg_transform_info, ptr %151, i32 0, i32 18
  %153 = load i32, ptr %152, align 4, !tbaa !21
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  call void @do_rot_270(ptr noundef %146, ptr noundef %147, i32 noundef %150, i32 noundef %153, ptr noundef %154, ptr noundef %155)
  br label %172

156:                                              ; preds = %4
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.jpeg_transform_info, ptr %159, i32 0, i32 17
  %161 = load i32, ptr %160, align 8, !tbaa !20
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.jpeg_transform_info, ptr %162, i32 0, i32 18
  %164 = load i32, ptr %163, align 4, !tbaa !21
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.jpeg_transform_info, ptr %166, i32 0, i32 19
  %168 = load i32, ptr %167, align 8, !tbaa !22
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.jpeg_transform_info, ptr %169, i32 0, i32 20
  %171 = load i32, ptr %170, align 4, !tbaa !23
  call void @do_wipe(ptr noundef %157, ptr noundef %158, i32 noundef %161, i32 noundef %164, ptr noundef %165, i32 noundef %168, i32 noundef %171)
  br label %172

172:                                              ; preds = %156, %145, %134, %123, %112, %101, %90, %89, %65, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @do_crop_ext(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_crop(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_flip_h(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_flip_h_no_crop(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_flip_v(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_transpose(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_transverse(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_rot_90(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_rot_180(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_rot_270(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @do_wipe(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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, !6, i64 48}
!10 = !{!"", !11, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!10, !11, i64 56}
!14 = !{!15, !11, i64 116}
!15 = !{!"jpeg_decompress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !11, i64 36, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !16, i64 80, !7, i64 88, !7, i64 89, !11, i64 92, !7, i64 96, !7, i64 97, !7, i64 98, !11, i64 100, !7, i64 104, !11, i64 108, !7, i64 112, !7, i64 113, !7, i64 114, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !6, i64 144, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !6, i64 176, !7, i64 184, !7, i64 216, !7, i64 248, !11, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !7, i64 298, !7, i64 299, !7, i64 315, !7, i64 331, !11, i64 348, !7, i64 352, !7, i64 353, !7, i64 354, !7, i64 355, !17, i64 356, !17, i64 358, !7, i64 360, !7, i64 361, !11, i64 364, !7, i64 368, !6, i64 376, !11, i64 384, !11, i64 388, !11, i64 392, !11, i64 396, !11, i64 400, !6, i64 408, !11, i64 416, !7, i64 424, !11, i64 456, !11, i64 460, !11, i64 464, !7, i64 468, !11, i64 508, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !6, i64 528, !11, i64 536, !11, i64 540, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624}
!16 = !{!"double", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!10, !11, i64 60}
!19 = !{!15, !11, i64 120}
!20 = !{!10, !11, i64 64}
!21 = !{!10, !11, i64 68}
!22 = !{!10, !11, i64 72}
!23 = !{!10, !11, i64 76}


; 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: nounwind uwtable
define dso_local void @jtransform_execute_transform(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %3, i64 48
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = load i32, ptr %3, align 8, !tbaa !11
  switch i32 %7, label %76 [
    i32 0, label %8
    i32 1, label %30
    i32 2, label %37
    i32 3, label %42
    i32 4, label %47
    i32 5, label %52
    i32 6, label %57
    i32 7, label %62
    i32 8, label %67
  ]

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %3, i64 56
  %10 = load i32, ptr %9, align 8, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %0, i64 116
  %12 = load i32, ptr %11, align 4, !tbaa !13
  %13 = icmp ugt i32 %10, %12
  br i1 %13, label %20, label %14

14:                                               ; preds = %8
  %15 = getelementptr inbounds i8, ptr %3, i64 60
  %16 = load i32, ptr %15, align 4, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %0, i64 120
  %18 = load i32, ptr %17, align 8, !tbaa !18
  %19 = icmp ugt i32 %16, %18
  br i1 %19, label %20, label %25

20:                                               ; preds = %14, %8
  %21 = getelementptr inbounds i8, ptr %3, i64 64
  %22 = load i32, ptr %21, align 8, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %3, i64 68
  %24 = load i32, ptr %23, align 4, !tbaa !20
  tail call void @do_crop_ext(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %22, i32 noundef %24, ptr noundef %2, ptr noundef %6)
  br label %76

25:                                               ; preds = %14
  %26 = getelementptr inbounds i8, ptr %3, i64 64
  %27 = load i32, ptr %26, align 8, !tbaa !19
  %.not74 = icmp eq i32 %27, 0
  %28 = getelementptr inbounds i8, ptr %3, i64 68
  %29 = load i32, ptr %28, align 4, !tbaa !20
  %.not75 = icmp eq i32 %29, 0
  %or.cond = select i1 %.not74, i1 %.not75, i1 false
  br i1 %or.cond, label %76, label %._crit_edge

._crit_edge:                                      ; preds = %25
  tail call void @do_crop(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %27, i32 noundef %29, ptr noundef %2, ptr noundef %6)
  br label %76

30:                                               ; preds = %4
  %31 = getelementptr inbounds i8, ptr %3, i64 68
  %32 = load i32, ptr %31, align 4, !tbaa !20
  %.not = icmp eq i32 %32, 0
  %33 = getelementptr inbounds i8, ptr %3, i64 64
  %34 = load i32, ptr %33, align 8, !tbaa !19
  br i1 %.not, label %36, label %35

35:                                               ; preds = %30
  tail call void @do_flip_h(ptr noundef %0, ptr noundef %1, i32 noundef %34, i32 noundef %32, ptr noundef %2, ptr noundef %6)
  br label %76

36:                                               ; preds = %30
  tail call void @do_flip_h_no_crop(ptr noundef %0, ptr noundef %1, i32 noundef %34, ptr noundef %2)
  br label %76

37:                                               ; preds = %4
  %38 = getelementptr inbounds i8, ptr %3, i64 64
  %39 = load i32, ptr %38, align 8, !tbaa !19
  %40 = getelementptr inbounds i8, ptr %3, i64 68
  %41 = load i32, ptr %40, align 4, !tbaa !20
  tail call void @do_flip_v(ptr noundef %0, ptr noundef %1, i32 noundef %39, i32 noundef %41, ptr noundef %2, ptr noundef %6)
  br label %76

42:                                               ; preds = %4
  %43 = getelementptr inbounds i8, ptr %3, i64 64
  %44 = load i32, ptr %43, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %3, i64 68
  %46 = load i32, ptr %45, align 4, !tbaa !20
  tail call void @do_transpose(ptr noundef %0, ptr noundef %1, i32 noundef %44, i32 noundef %46, ptr noundef %2, ptr noundef %6)
  br label %76

47:                                               ; preds = %4
  %48 = getelementptr inbounds i8, ptr %3, i64 64
  %49 = load i32, ptr %48, align 8, !tbaa !19
  %50 = getelementptr inbounds i8, ptr %3, i64 68
  %51 = load i32, ptr %50, align 4, !tbaa !20
  tail call void @do_transverse(ptr noundef %0, ptr noundef %1, i32 noundef %49, i32 noundef %51, ptr noundef %2, ptr noundef %6)
  br label %76

52:                                               ; preds = %4
  %53 = getelementptr inbounds i8, ptr %3, i64 64
  %54 = load i32, ptr %53, align 8, !tbaa !19
  %55 = getelementptr inbounds i8, ptr %3, i64 68
  %56 = load i32, ptr %55, align 4, !tbaa !20
  tail call void @do_rot_90(ptr noundef %0, ptr noundef %1, i32 noundef %54, i32 noundef %56, ptr noundef %2, ptr noundef %6)
  br label %76

57:                                               ; preds = %4
  %58 = getelementptr inbounds i8, ptr %3, i64 64
  %59 = load i32, ptr %58, align 8, !tbaa !19
  %60 = getelementptr inbounds i8, ptr %3, i64 68
  %61 = load i32, ptr %60, align 4, !tbaa !20
  tail call void @do_rot_180(ptr noundef %0, ptr noundef %1, i32 noundef %59, i32 noundef %61, ptr noundef %2, ptr noundef %6)
  br label %76

62:                                               ; preds = %4
  %63 = getelementptr inbounds i8, ptr %3, i64 64
  %64 = load i32, ptr %63, align 8, !tbaa !19
  %65 = getelementptr inbounds i8, ptr %3, i64 68
  %66 = load i32, ptr %65, align 4, !tbaa !20
  tail call void @do_rot_270(ptr noundef %0, ptr noundef %1, i32 noundef %64, i32 noundef %66, ptr noundef %2, ptr noundef %6)
  br label %76

67:                                               ; preds = %4
  %68 = getelementptr inbounds i8, ptr %3, i64 64
  %69 = load i32, ptr %68, align 8, !tbaa !19
  %70 = getelementptr inbounds i8, ptr %3, i64 68
  %71 = load i32, ptr %70, align 4, !tbaa !20
  %72 = getelementptr inbounds i8, ptr %3, i64 72
  %73 = load i32, ptr %72, align 8, !tbaa !21
  %74 = getelementptr inbounds i8, ptr %3, i64 76
  %75 = load i32, ptr %74, align 4, !tbaa !22
  tail call void @do_wipe(ptr noundef %0, ptr noundef %1, i32 noundef %69, i32 noundef %71, ptr noundef %2, i32 noundef %73, i32 noundef %75)
  br label %76

76:                                               ; preds = %25, %35, %36, %20, %._crit_edge, %67, %62, %57, %52, %47, %42, %37, %4
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @do_crop_ext(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_crop(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_flip_h(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_flip_h_no_crop(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_flip_v(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_transpose(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_transverse(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_rot_90(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_rot_180(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_rot_270(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @do_wipe(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

!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 48}
!6 = !{!"", !7, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 56}
!13 = !{!14, !7, i64 116}
!14 = !{!"jpeg_decompress_struct", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !8, i64 32, !7, i64 36, !10, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !15, i64 80, !8, i64 88, !8, i64 89, !7, i64 92, !8, i64 96, !8, i64 97, !8, i64 98, !7, i64 100, !8, i64 104, !7, i64 108, !8, i64 112, !8, i64 113, !8, i64 114, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !10, i64 144, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !10, i64 176, !8, i64 184, !8, i64 216, !8, i64 248, !7, i64 280, !10, i64 288, !8, i64 296, !8, i64 297, !8, i64 298, !8, i64 299, !8, i64 315, !8, i64 331, !7, i64 348, !8, i64 352, !8, i64 353, !8, i64 354, !8, i64 355, !16, i64 356, !16, i64 358, !8, i64 360, !8, i64 361, !7, i64 364, !8, i64 368, !10, i64 376, !7, i64 384, !7, i64 388, !7, i64 392, !7, i64 396, !7, i64 400, !10, i64 408, !7, i64 416, !8, i64 424, !7, i64 456, !7, i64 460, !7, i64 464, !8, i64 468, !7, i64 508, !7, i64 512, !7, i64 516, !7, i64 520, !7, i64 524, !10, i64 528, !7, i64 536, !7, i64 540, !10, i64 544, !10, i64 552, !10, i64 560, !10, i64 568, !10, i64 576, !10, i64 584, !10, i64 592, !10, i64 600, !10, i64 608, !10, i64 616, !10, i64 624}
!15 = !{!"double", !8, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = !{!6, !7, i64 60}
!18 = !{!14, !7, i64 120}
!19 = !{!6, !7, i64 64}
!20 = !{!6, !7, i64 68}
!21 = !{!6, !7, i64 72}
!22 = !{!6, !7, i64 76}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass