; LLVM IR from drohmer/cgp :: library/third_party/src/jpeg/jpgd.ll (ZN4jpgd12jpeg_decoder6decodeEPPKvPj)

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

%"class.jpgd::jpeg_decoder" = type <{ [1 x %struct.__jmp_buf_tag], ptr, i32, i32, ptr, i32, [8 x i8], [4 x i8], [8 x ptr], [8 x ptr], [4 x ptr], i32, i32, [4 x i32], [4 x i32], [4 x i32], [4 x i32], [4 x i32], [4 x i32], i32, [4 x i32], [4 x i32], [4 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, [8 x ptr], [4 x ptr], [4 x ptr], i32, [4 x i32], [4 x i8], ptr, i32, i32, i8, [128 x i8], [8320 x i8], [128 x i8], [3 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, [3 x i8], i32, [4 x i32], [4 x i8], ptr, [10 x i32], ptr, [256 x i32], [256 x i32], [256 x i32], [256 x i32], ptr, ptr, i32, i8, [3 x i8], i32, [4 x i8] }>
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder13load_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder15decode_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H1V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H2V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H1V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H2V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder12gray_convertEv(ptr noundef nonnull align 8 dereferenceable(13652)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder16expanded_convertEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder8find_eoiEv(ptr noundef nonnull align 8 dereferenceable(13652)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4jpgd12jpeg_decoder6decodeEPPKvPj(ptr noundef nonnull align 8 dereferenceable(13652) %0, ptr noundef %1, ptr noundef %2) #0 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = 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
  %8 = load ptr, ptr %5, align 8
  %9 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 77
  %10 = load i32, ptr %9, align 8, !tbaa !9
  %11 = icmp ne i32 %10, 0
  br i1 %11, label %16, label %12

12:                                               ; preds = %3
  %13 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 78
  %14 = load i8, ptr %13, align 4, !tbaa !14, !range !15, !noundef !16
  %15 = trunc i8 %14 to i1
  br i1 %15, label %17, label %16

16:                                               ; preds = %12, %3
  store i32 -1, ptr %4, align 4
  br label %111

17:                                               ; preds = %12
  %18 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 34
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  store i32 1, ptr %4, align 4
  br label %111

22:                                               ; preds = %17
  %23 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 35
  %24 = load i32, ptr %23, align 8, !tbaa !18
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %49

26:                                               ; preds = %22
  %27 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 0
  %28 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %27, i64 0, i64 0
  %29 = call i32 @_setjmp(ptr noundef %28) #3
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  store i32 -1, ptr %4, align 4
  br label %111

32:                                               ; preds = %26
  %33 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 5
  %34 = load i32, ptr %33, align 8, !tbaa !19
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  call void @_ZN4jpgd12jpeg_decoder13load_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  br label %38

37:                                               ; preds = %32
  call void @_ZN4jpgd12jpeg_decoder15decode_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  br label %38

38:                                               ; preds = %37, %36
  %39 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 34
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 28
  %42 = load i32, ptr %41, align 8, !tbaa !20
  %43 = icmp sle i32 %40, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %38
  call void @_ZN4jpgd12jpeg_decoder8find_eoiEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  br label %45

45:                                               ; preds = %44, %38
  %46 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 28
  %47 = load i32, ptr %46, align 8, !tbaa !20
  %48 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 35
  store i32 %47, ptr %48, align 8, !tbaa !18
  br label %49

49:                                               ; preds = %45, %22
  %50 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 63
  %51 = load i8, ptr %50, align 4, !tbaa !21, !range !15, !noundef !16
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %57

53:                                               ; preds = %49
  call void @_ZN4jpgd12jpeg_decoder16expanded_convertEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  %54 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 75
  %55 = load ptr, ptr %54, align 8, !tbaa !22
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %55, ptr %56, align 8, !tbaa !5
  br label %101

57:                                               ; preds = %49
  %58 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 11
  %59 = load i32, ptr %58, align 8, !tbaa !23
  switch i32 %59, label %100 [
    i32 4, label %60
    i32 2, label %74
    i32 3, label %78
    i32 1, label %92
    i32 0, label %96
  ]

60:                                               ; preds = %57
  %61 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 35
  %62 = load i32, ptr %61, align 8, !tbaa !18
  %63 = and i32 %62, 1
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %69

65:                                               ; preds = %60
  call void @_ZN4jpgd12jpeg_decoder11H2V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  %66 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 75
  %67 = load ptr, ptr %66, align 8, !tbaa !22
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %67, ptr %68, align 8, !tbaa !5
  br label %73

69:                                               ; preds = %60
  %70 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 76
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %71, ptr %72, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %69, %65
  br label %100

74:                                               ; preds = %57
  call void @_ZN4jpgd12jpeg_decoder11H2V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  %75 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 75
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %76, ptr %77, align 8, !tbaa !5
  br label %100

78:                                               ; preds = %57
  %79 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 35
  %80 = load i32, ptr %79, align 8, !tbaa !18
  %81 = and i32 %80, 1
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %87

83:                                               ; preds = %78
  call void @_ZN4jpgd12jpeg_decoder11H1V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  %84 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 75
  %85 = load ptr, ptr %84, align 8, !tbaa !22
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %85, ptr %86, align 8, !tbaa !5
  br label %91

87:                                               ; preds = %78
  %88 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 76
  %89 = load ptr, ptr %88, align 8, !tbaa !24
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %89, ptr %90, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %87, %83
  br label %100

92:                                               ; preds = %57
  call void @_ZN4jpgd12jpeg_decoder11H1V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  %93 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 75
  %94 = load ptr, ptr %93, align 8, !tbaa !22
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %94, ptr %95, align 8, !tbaa !5
  br label %100

96:                                               ; preds = %57
  call void @_ZN4jpgd12jpeg_decoder12gray_convertEv(ptr noundef nonnull align 8 dereferenceable(13652) %8)
  %97 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 75
  %98 = load ptr, ptr %97, align 8, !tbaa !22
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %98, ptr %99, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %96, %92, %91, %74, %73, %57
  br label %101

101:                                              ; preds = %100, %53
  %102 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 36
  %103 = load i32, ptr %102, align 4, !tbaa !25
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %103, ptr %104, align 4, !tbaa !26
  %105 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 35
  %106 = load i32, ptr %105, align 8, !tbaa !18
  %107 = add nsw i32 %106, -1
  store i32 %107, ptr %105, align 8, !tbaa !18
  %108 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 34
  %109 = load i32, ptr %108, align 4, !tbaa !17
  %110 = add nsw i32 %109, -1
  store i32 %110, ptr %108, align 4, !tbaa !17
  store i32 0, ptr %4, align 4
  br label %111

111:                                              ; preds = %101, %31, %21, %16
  %112 = load i32, ptr %4, align 4
  ret i32 %112
}

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #2

attributes #0 = { mustprogress 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 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 returns_twice "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 returns_twice }

!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++ TBAA"}
!9 = !{!10, !13, i64 13640}
!10 = !{!"_ZTSN4jpgd12jpeg_decoderE", !7, i64 0, !6, i64 200, !11, i64 208, !11, i64 212, !6, i64 216, !11, i64 224, !7, i64 228, !7, i64 240, !7, i64 304, !7, i64 368, !11, i64 400, !11, i64 404, !7, i64 408, !7, i64 424, !7, i64 440, !7, i64 456, !7, i64 472, !7, i64 488, !11, i64 504, !7, i64 508, !7, i64 524, !7, i64 540, !11, i64 556, !11, i64 560, !11, i64 564, !11, i64 568, !11, i64 572, !11, i64 576, !11, i64 580, !11, i64 584, !11, i64 588, !11, i64 592, !7, i64 596, !11, i64 636, !11, i64 640, !11, i64 644, !11, i64 648, !11, i64 652, !7, i64 656, !7, i64 720, !7, i64 752, !11, i64 784, !7, i64 788, !6, i64 808, !11, i64 816, !11, i64 820, !12, i64 824, !7, i64 825, !7, i64 953, !7, i64 9273, !11, i64 9404, !11, i64 9408, !11, i64 9412, !11, i64 9416, !11, i64 9420, !11, i64 9424, !11, i64 9428, !11, i64 9432, !11, i64 9436, !11, i64 9440, !12, i64 9444, !11, i64 9448, !7, i64 9452, !6, i64 9472, !7, i64 9480, !6, i64 9520, !7, i64 9528, !7, i64 10552, !7, i64 11576, !7, i64 12600, !6, i64 13624, !6, i64 13632, !13, i64 13640, !12, i64 13644, !11, i64 13648}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN4jpgd11jpgd_statusE", !7, i64 0}
!14 = !{!10, !12, i64 13644}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!10, !11, i64 636}
!18 = !{!10, !11, i64 640}
!19 = !{!10, !11, i64 224}
!20 = !{!10, !11, i64 576}
!21 = !{!10, !12, i64 9444}
!22 = !{!10, !6, i64 13624}
!23 = !{!10, !11, i64 400}
!24 = !{!10, !6, i64 13632}
!25 = !{!10, !11, i64 644}
!26 = !{!11, !11, i64 0}


; 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: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder13load_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder15decode_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H1V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H2V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H1V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder11H2V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder12gray_convertEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder16expanded_convertEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4jpgd12jpeg_decoder8find_eoiEv(ptr noundef nonnull align 8 dereferenceable(13652)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 2) i32 @_ZN4jpgd12jpeg_decoder6decodeEPPKvPj(ptr noundef nonnull align 8 dereferenceable(13652) %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 13640
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %6, label %59

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 13644
  %8 = load i8, ptr %7, align 4, !tbaa !13, !range !14, !noundef !15
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %59

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %0, i64 636
  %12 = load i32, ptr %11, align 4, !tbaa !16
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %59, label %14

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 640
  %16 = load i32, ptr %15, align 8, !tbaa !17
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %32

18:                                               ; preds = %14
  %19 = call i32 @_setjmp(ptr noundef nonnull %0) #3
  %.not10 = icmp eq i32 %19, 0
  br i1 %.not10, label %20, label %59

20:                                               ; preds = %18
  %21 = getelementptr inbounds i8, ptr %0, i64 224
  %22 = load i32, ptr %21, align 8, !tbaa !18
  %.not11 = icmp eq i32 %22, 0
  br i1 %.not11, label %24, label %23

23:                                               ; preds = %20
  call void @_ZN4jpgd12jpeg_decoder13load_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %25

24:                                               ; preds = %20
  call void @_ZN4jpgd12jpeg_decoder15decode_next_rowEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %25

25:                                               ; preds = %24, %23
  %26 = load i32, ptr %11, align 4, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %0, i64 576
  %28 = load i32, ptr %27, align 8, !tbaa !19
  %.not12 = icmp sgt i32 %26, %28
  br i1 %.not12, label %30, label %29

29:                                               ; preds = %25
  call void @_ZN4jpgd12jpeg_decoder8find_eoiEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  %.pre = load i32, ptr %27, align 8, !tbaa !19
  br label %30

30:                                               ; preds = %29, %25
  %31 = phi i32 [ %.pre, %29 ], [ %28, %25 ]
  store i32 %31, ptr %15, align 8, !tbaa !17
  br label %32

32:                                               ; preds = %30, %14
  %33 = phi i32 [ %31, %30 ], [ %16, %14 ]
  %34 = getelementptr inbounds i8, ptr %0, i64 9444
  %35 = load i8, ptr %34, align 4, !tbaa !20, !range !14, !noundef !15
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %37, label %38

37:                                               ; preds = %32
  call void @_ZN4jpgd12jpeg_decoder16expanded_convertEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %.sink.split

38:                                               ; preds = %32
  %39 = getelementptr inbounds i8, ptr %0, i64 400
  %40 = load i32, ptr %39, align 8, !tbaa !21
  switch i32 %40, label %54 [
    i32 4, label %41
    i32 2, label %45
    i32 3, label %46
    i32 1, label %50
    i32 0, label %51
  ]

41:                                               ; preds = %38
  %42 = and i32 %33, 1
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %.sink.split

44:                                               ; preds = %41
  call void @_ZN4jpgd12jpeg_decoder11H2V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %.sink.split

45:                                               ; preds = %38
  call void @_ZN4jpgd12jpeg_decoder11H2V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %.sink.split

46:                                               ; preds = %38
  %47 = and i32 %33, 1
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %.sink.split

49:                                               ; preds = %46
  call void @_ZN4jpgd12jpeg_decoder11H1V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %.sink.split

50:                                               ; preds = %38
  call void @_ZN4jpgd12jpeg_decoder11H1V1ConvertEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %.sink.split

51:                                               ; preds = %38
  call void @_ZN4jpgd12jpeg_decoder12gray_convertEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  br label %.sink.split

.sink.split:                                      ; preds = %46, %41, %37, %49, %44, %51, %50, %45
  %.sink = phi i64 [ 13624, %45 ], [ 13624, %50 ], [ 13624, %51 ], [ 13624, %44 ], [ 13624, %49 ], [ 13624, %37 ], [ 13632, %41 ], [ 13632, %46 ]
  %52 = getelementptr inbounds i8, ptr %0, i64 %.sink
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  store ptr %53, ptr %1, align 8, !tbaa !22
  br label %54

54:                                               ; preds = %.sink.split, %38
  %55 = getelementptr inbounds i8, ptr %0, i64 644
  %56 = load i32, ptr %55, align 4, !tbaa !23
  store i32 %56, ptr %2, align 4, !tbaa !24
  %57 = load <2 x i32>, ptr %11, align 4, !tbaa !24
  %58 = add nsw <2 x i32> %57, <i32 -1, i32 -1>
  store <2 x i32> %58, ptr %11, align 4, !tbaa !24
  br label %59

59:                                               ; preds = %18, %10, %3, %6, %54
  %.0 = phi i32 [ 0, %54 ], [ -1, %6 ], [ -1, %3 ], [ 1, %10 ], [ -1, %18 ]
  ret i32 %.0
}

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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 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 returns_twice "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 returns_twice }

!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, !12, i64 13640}
!6 = !{!"_ZTSN4jpgd12jpeg_decoderE", !7, i64 0, !9, i64 200, !10, i64 208, !10, i64 212, !9, i64 216, !10, i64 224, !7, i64 228, !7, i64 240, !7, i64 304, !7, i64 368, !10, i64 400, !10, i64 404, !7, i64 408, !7, i64 424, !7, i64 440, !7, i64 456, !7, i64 472, !7, i64 488, !10, i64 504, !7, i64 508, !7, i64 524, !7, i64 540, !10, i64 556, !10, i64 560, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !10, i64 592, !7, i64 596, !10, i64 636, !10, i64 640, !10, i64 644, !10, i64 648, !10, i64 652, !7, i64 656, !7, i64 720, !7, i64 752, !10, i64 784, !7, i64 788, !9, i64 808, !10, i64 816, !10, i64 820, !11, i64 824, !7, i64 825, !7, i64 953, !7, i64 9273, !10, i64 9404, !10, i64 9408, !10, i64 9412, !10, i64 9416, !10, i64 9420, !10, i64 9424, !10, i64 9428, !10, i64 9432, !10, i64 9436, !10, i64 9440, !11, i64 9444, !10, i64 9448, !7, i64 9452, !9, i64 9472, !7, i64 9480, !9, i64 9520, !7, i64 9528, !7, i64 10552, !7, i64 11576, !7, i64 12600, !9, i64 13624, !9, i64 13632, !12, i64 13640, !11, i64 13644, !10, i64 13648}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN4jpgd11jpgd_statusE", !7, i64 0}
!13 = !{!6, !11, i64 13644}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!6, !10, i64 636}
!17 = !{!6, !10, i64 640}
!18 = !{!6, !10, i64 224}
!19 = !{!6, !10, i64 576}
!20 = !{!6, !11, i64 9444}
!21 = !{!6, !10, i64 400}
!22 = !{!9, !9, i64 0}
!23 = !{!6, !10, i64 644}
!24 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass