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

; 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: 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13652), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4jpgd12jpeg_decoder4initEPNS_19jpeg_decoder_streamE(ptr noundef nonnull align 8 dereferenceable(13652) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  %7 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 1
  store ptr null, ptr %7, align 8, !tbaa !9
  %8 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 77
  store i32 0, ptr %8, align 8, !tbaa !14
  %9 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 78
  store i8 0, ptr %9, align 4, !tbaa !15
  %10 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 3
  store i32 0, ptr %10, align 4, !tbaa !16
  %11 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 2
  store i32 0, ptr %11, align 8, !tbaa !17
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 4
  store ptr %12, ptr %13, align 8, !tbaa !18
  %14 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 5
  store i32 0, ptr %14, align 8, !tbaa !19
  %15 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 6
  %16 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %16, i8 0, i64 8, i1 false)
  %17 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 8
  %18 = getelementptr inbounds [8 x ptr], ptr %17, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  %19 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 9
  %20 = getelementptr inbounds [8 x ptr], ptr %19, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  %21 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 10
  %22 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 32, i1 false)
  %23 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 11
  store i32 0, ptr %23, align 8, !tbaa !20
  %24 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 12
  store i32 0, ptr %24, align 4, !tbaa !21
  %25 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 13
  %26 = getelementptr inbounds [4 x i32], ptr %25, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 16, i1 false)
  %27 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 14
  %28 = getelementptr inbounds [4 x i32], ptr %27, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 16, i1 false)
  %29 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 15
  %30 = getelementptr inbounds [4 x i32], ptr %29, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %30, i8 0, i64 16, i1 false)
  %31 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 16
  %32 = getelementptr inbounds [4 x i32], ptr %31, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 16, i1 false)
  %33 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 17
  %34 = getelementptr inbounds [4 x i32], ptr %33, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %34, i8 0, i64 16, i1 false)
  %35 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 18
  %36 = getelementptr inbounds [4 x i32], ptr %35, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %36, i8 0, i64 16, i1 false)
  %37 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 19
  store i32 0, ptr %37, align 8, !tbaa !22
  %38 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 20
  %39 = getelementptr inbounds [4 x i32], ptr %38, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %39, i8 0, i64 16, i1 false)
  %40 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 21
  %41 = getelementptr inbounds [4 x i32], ptr %40, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %41, i8 0, i64 16, i1 false)
  %42 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 22
  %43 = getelementptr inbounds [4 x i32], ptr %42, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %43, i8 0, i64 16, i1 false)
  %44 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 23
  store i32 0, ptr %44, align 4, !tbaa !23
  %45 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 24
  store i32 0, ptr %45, align 8, !tbaa !24
  %46 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 25
  store i32 0, ptr %46, align 4, !tbaa !25
  %47 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 26
  store i32 0, ptr %47, align 8, !tbaa !26
  %48 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 27
  store i32 0, ptr %48, align 4, !tbaa !27
  %49 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 28
  store i32 0, ptr %49, align 8, !tbaa !28
  %50 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 29
  store i32 0, ptr %50, align 4, !tbaa !29
  %51 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 30
  store i32 0, ptr %51, align 8, !tbaa !30
  %52 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 31
  store i32 0, ptr %52, align 4, !tbaa !31
  %53 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 32
  store i32 0, ptr %53, align 8, !tbaa !32
  %54 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 62
  store i32 0, ptr %54, align 8, !tbaa !33
  %55 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 60
  store i32 0, ptr %55, align 8, !tbaa !34
  %56 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 61
  store i32 0, ptr %56, align 4, !tbaa !35
  %57 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 63
  store i8 0, ptr %57, align 4, !tbaa !36
  %58 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 33
  %59 = getelementptr inbounds [10 x i32], ptr %58, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %59, i8 0, i64 40, i1 false)
  %60 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 34
  store i32 0, ptr %60, align 4, !tbaa !37
  %61 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 35
  store i32 0, ptr %61, align 8, !tbaa !38
  %62 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 36
  store i32 0, ptr %62, align 4, !tbaa !39
  %63 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 37
  store i32 0, ptr %63, align 8, !tbaa !40
  %64 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 38
  store i32 0, ptr %64, align 4, !tbaa !41
  %65 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 39
  %66 = getelementptr inbounds [8 x ptr], ptr %65, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %66, i8 0, i64 64, i1 false)
  %67 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 40
  %68 = getelementptr inbounds [4 x ptr], ptr %67, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %68, i8 0, i64 32, i1 false)
  %69 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 41
  %70 = getelementptr inbounds [4 x ptr], ptr %69, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %70, i8 0, i64 32, i1 false)
  %71 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 43
  %72 = getelementptr inbounds [4 x i32], ptr %71, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %72, i8 0, i64 16, i1 false)
  %73 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 42
  store i32 0, ptr %73, align 8, !tbaa !42
  %74 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 43
  %75 = getelementptr inbounds [4 x i32], ptr %74, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %75, i8 0, i64 16, i1 false)
  %76 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 50
  %77 = getelementptr inbounds [8320 x i8], ptr %76, i64 0, i64 0
  %78 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 45
  store ptr %77, ptr %78, align 8, !tbaa !43
  %79 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 46
  store i32 0, ptr %79, align 8, !tbaa !44
  %80 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 48
  store i8 0, ptr %80, align 8, !tbaa !45
  %81 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 47
  store i32 0, ptr %81, align 4, !tbaa !46
  %82 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 49
  %83 = getelementptr inbounds [128 x i8], ptr %82, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %83, i8 0, i64 128, i1 false)
  %84 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 50
  %85 = getelementptr inbounds [8320 x i8], ptr %84, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %85, i8 0, i64 8320, i1 false)
  %86 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 51
  %87 = getelementptr inbounds [128 x i8], ptr %86, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %87, i8 0, i64 128, i1 false)
  %88 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 55
  store i32 0, ptr %88, align 4, !tbaa !47
  %89 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 56
  store i32 0, ptr %89, align 8, !tbaa !48
  %90 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 57
  store i32 0, ptr %90, align 4, !tbaa !49
  %91 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 58
  store i32 0, ptr %91, align 8, !tbaa !50
  %92 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 59
  store i32 0, ptr %92, align 4, !tbaa !51
  %93 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 65
  store i32 0, ptr %93, align 8, !tbaa !52
  %94 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 66
  %95 = getelementptr inbounds [4 x i32], ptr %94, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %95, i8 0, i64 16, i1 false)
  %96 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 68
  store ptr null, ptr %96, align 8, !tbaa !53
  %97 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 70
  store ptr null, ptr %97, align 8, !tbaa !54
  %98 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 80
  store i32 0, ptr %98, align 8, !tbaa !55
  %99 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 75
  store ptr null, ptr %99, align 8, !tbaa !56
  %100 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 76
  store ptr null, ptr %100, align 8, !tbaa !57
  call void @_ZN4jpgd12jpeg_decoder14prep_in_bufferEv(ptr noundef nonnull align 8 dereferenceable(13652) %6)
  %101 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 53
  store i32 16, ptr %101, align 4, !tbaa !58
  %102 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 54
  store i32 0, ptr %102, align 8, !tbaa !59
  %103 = call noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13652) %6, i32 noundef 16)
  %104 = call noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13652) %6, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !60
  br label %105

105:                                              ; preds = %114, %2
  %106 = load i32, ptr %5, align 4, !tbaa !60
  %107 = icmp slt i32 %106, 10
  br i1 %107, label %109, label %108

108:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %117

109:                                              ; preds = %105
  %110 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %6, i32 0, i32 69
  %111 = load i32, ptr %5, align 4, !tbaa !60
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [10 x i32], ptr %110, i64 0, i64 %112
  store i32 64, ptr %113, align 4, !tbaa !60
  br label %114

114:                                              ; preds = %109
  %115 = load i32, ptr %5, align 4, !tbaa !60
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %5, align 4, !tbaa !60
  br label %105, !llvm.loop !61

117:                                              ; preds = %108
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { 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++ TBAA"}
!9 = !{!10, !6, i64 200}
!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, !13, i64 13640}
!15 = !{!10, !12, i64 13644}
!16 = !{!10, !11, i64 212}
!17 = !{!10, !11, i64 208}
!18 = !{!10, !6, i64 216}
!19 = !{!10, !11, i64 224}
!20 = !{!10, !11, i64 400}
!21 = !{!10, !11, i64 404}
!22 = !{!10, !11, i64 504}
!23 = !{!10, !11, i64 556}
!24 = !{!10, !11, i64 560}
!25 = !{!10, !11, i64 564}
!26 = !{!10, !11, i64 568}
!27 = !{!10, !11, i64 572}
!28 = !{!10, !11, i64 576}
!29 = !{!10, !11, i64 580}
!30 = !{!10, !11, i64 584}
!31 = !{!10, !11, i64 588}
!32 = !{!10, !11, i64 592}
!33 = !{!10, !11, i64 9440}
!34 = !{!10, !11, i64 9432}
!35 = !{!10, !11, i64 9436}
!36 = !{!10, !12, i64 9444}
!37 = !{!10, !11, i64 636}
!38 = !{!10, !11, i64 640}
!39 = !{!10, !11, i64 644}
!40 = !{!10, !11, i64 648}
!41 = !{!10, !11, i64 652}
!42 = !{!10, !11, i64 784}
!43 = !{!10, !6, i64 808}
!44 = !{!10, !11, i64 816}
!45 = !{!10, !12, i64 824}
!46 = !{!10, !11, i64 820}
!47 = !{!10, !11, i64 9412}
!48 = !{!10, !11, i64 9416}
!49 = !{!10, !11, i64 9420}
!50 = !{!10, !11, i64 9424}
!51 = !{!10, !11, i64 9428}
!52 = !{!10, !11, i64 9448}
!53 = !{!10, !6, i64 9472}
!54 = !{!10, !6, i64 9520}
!55 = !{!10, !11, i64 13648}
!56 = !{!10, !6, i64 13624}
!57 = !{!10, !6, i64 13632}
!58 = !{!10, !11, i64 9404}
!59 = !{!10, !11, i64 9408}
!60 = !{!11, !11, i64 0}
!61 = distinct !{!61, !62}
!62 = !{!"llvm.loop.mustprogress"}


; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13652), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4jpgd12jpeg_decoder4initEPNS_19jpeg_decoder_streamE(ptr noundef nonnull align 8 dereferenceable(13652) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 200
  %4 = getelementptr inbounds i8, ptr %0, i64 13640
  store i32 0, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 13644
  store i8 0, ptr %5, align 4, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 216
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  store ptr %1, ptr %6, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %0, i64 224
  store i32 0, ptr %7, align 8, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 228
  store i64 0, ptr %8, align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 240
  %10 = getelementptr inbounds i8, ptr %0, i64 9432
  %11 = getelementptr inbounds i8, ptr %0, i64 953
  %12 = getelementptr inbounds i8, ptr %0, i64 808
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(564) %9, i8 0, i64 564, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(13) %10, i8 0, i64 13, i1 false)
  store ptr %11, ptr %12, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %0, i64 816
  %14 = getelementptr inbounds i8, ptr %0, i64 9412
  %15 = getelementptr inbounds i8, ptr %0, i64 9448
  %16 = getelementptr inbounds i8, ptr %0, i64 9472
  store ptr null, ptr %16, align 8, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %0, i64 9520
  store ptr null, ptr %17, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %0, i64 13648
  store i32 0, ptr %18, align 8, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %0, i64 13624
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(8585) %13, i8 0, i64 8585, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %14, i8 0, i64 20, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %15, i8 0, i64 20, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 0, i64 16, i1 false)
  tail call void @_ZN4jpgd12jpeg_decoder14prep_in_bufferEv(ptr noundef nonnull align 8 dereferenceable(13652) %0)
  %20 = getelementptr inbounds i8, ptr %0, i64 9404
  store i32 16, ptr %20, align 4, !tbaa !20
  %21 = getelementptr inbounds i8, ptr %0, i64 9408
  store i32 0, ptr %21, align 8, !tbaa !21
  %22 = tail call noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13652) %0, i32 noundef 16)
  %23 = tail call noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13652) %0, i32 noundef 16)
  %24 = getelementptr inbounds i8, ptr %0, i64 9480
  store <4 x i32> <i32 64, i32 64, i32 64, i32 64>, ptr %24, align 8, !tbaa !22
  %25 = getelementptr inbounds i8, ptr %0, i64 9496
  store <4 x i32> <i32 64, i32 64, i32 64, i32 64>, ptr %25, align 8, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %0, i64 9512
  store i32 64, ptr %26, align 8, !tbaa !22
  %27 = getelementptr inbounds i8, ptr %0, i64 9516
  store i32 64, ptr %27, align 4, !tbaa !22
  ret void
}

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { 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 #2 = { inlinehint 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" }

!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 = !{!6, !9, i64 216}
!15 = !{!6, !10, i64 224}
!16 = !{!6, !9, i64 808}
!17 = !{!6, !9, i64 9472}
!18 = !{!6, !9, i64 9520}
!19 = !{!6, !10, i64 13648}
!20 = !{!6, !10, i64 9404}
!21 = !{!6, !10, i64 9408}
!22 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass