; LLVM IR from facebookresearch/habitat-sim :: src/deps/basis-universal/encoder (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], i32, [4 x i8], 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, i32, [4 x i8], [8 x ptr], [4 x ptr], [4 x ptr], i32, [4 x i32], [4 x i8], ptr, i32, i32, [64 x i8], [8320 x i8], [64 x i8], i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], ptr, [10 x i32], ptr, ptr, [256 x i32], [256 x i32], [256 x i32], [256 x i32], ptr, ptr, i32, i32, i8, i8, i8, [5 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(13523)) #2 align 2

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

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

106:                                              ; preds = %115, %3
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = icmp slt i32 %107, 10
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %118

110:                                              ; preds = %106
  %111 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %8, i32 0, i32 65
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [10 x i32], ptr %111, i64 0, i64 %113
  store i32 64, ptr %114, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %110
  %116 = load i32, ptr %7, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %7, align 4, !tbaa !9
  br label %106, !llvm.loop !61

118:                                              ; preds = %109
  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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 200}
!12 = !{!"_ZTSN4jpgd12jpeg_decoderE", !7, i64 0, !10, i64 200, !6, i64 208, !10, i64 216, !10, i64 220, !6, i64 224, !10, i64 232, !7, i64 236, !7, i64 248, !7, i64 312, !7, i64 376, !10, i64 408, !10, i64 412, !7, i64 416, !7, i64 432, !7, i64 448, !7, i64 464, !7, i64 480, !7, i64 496, !10, i64 512, !7, i64 516, !7, i64 532, !7, i64 548, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !10, i64 592, !10, i64 596, !10, i64 600, !7, i64 604, !10, i64 644, !10, i64 648, !10, i64 652, !10, i64 656, !10, i64 660, !10, i64 664, !7, i64 672, !7, i64 736, !7, i64 768, !10, i64 800, !7, i64 804, !6, i64 824, !10, i64 832, !10, i64 836, !7, i64 840, !7, i64 904, !7, i64 9224, !10, i64 9288, !10, i64 9292, !10, i64 9296, !10, i64 9300, !10, i64 9304, !10, i64 9308, !10, i64 9312, !10, i64 9316, !7, i64 9320, !6, i64 9336, !7, i64 9344, !6, i64 9384, !6, i64 9392, !7, i64 9400, !7, i64 10424, !7, i64 11448, !7, i64 12472, !6, i64 13496, !6, i64 13504, !13, i64 13512, !10, i64 13516, !14, i64 13520, !14, i64 13521, !14, i64 13522}
!13 = !{!"_ZTSN4jpgd11jpgd_statusE", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !6, i64 208}
!16 = !{!12, !13, i64 13512}
!17 = !{!12, !14, i64 13520}
!18 = !{!12, !10, i64 220}
!19 = !{!12, !10, i64 216}
!20 = !{!12, !6, i64 224}
!21 = !{!12, !10, i64 232}
!22 = !{!12, !10, i64 408}
!23 = !{!12, !10, i64 412}
!24 = !{!12, !10, i64 512}
!25 = !{!12, !10, i64 564}
!26 = !{!12, !10, i64 568}
!27 = !{!12, !10, i64 572}
!28 = !{!12, !10, i64 576}
!29 = !{!12, !10, i64 580}
!30 = !{!12, !10, i64 584}
!31 = !{!12, !10, i64 588}
!32 = !{!12, !10, i64 592}
!33 = !{!12, !10, i64 596}
!34 = !{!12, !10, i64 600}
!35 = !{!12, !10, i64 644}
!36 = !{!12, !10, i64 648}
!37 = !{!12, !10, i64 652}
!38 = !{!12, !10, i64 656}
!39 = !{!12, !10, i64 660}
!40 = !{!12, !10, i64 664}
!41 = !{!12, !10, i64 800}
!42 = !{!12, !6, i64 824}
!43 = !{!12, !10, i64 832}
!44 = !{!12, !14, i64 13521}
!45 = !{!12, !10, i64 836}
!46 = !{!12, !10, i64 9296}
!47 = !{!12, !10, i64 9300}
!48 = !{!12, !10, i64 9304}
!49 = !{!12, !10, i64 9308}
!50 = !{!12, !10, i64 9312}
!51 = !{!12, !10, i64 9316}
!52 = !{!12, !6, i64 9336}
!53 = !{!12, !6, i64 9384}
!54 = !{!12, !6, i64 9392}
!55 = !{!12, !14, i64 13522}
!56 = !{!12, !10, i64 13516}
!57 = !{!12, !6, i64 13496}
!58 = !{!12, !6, i64 13504}
!59 = !{!12, !10, i64 9288}
!60 = !{!12, !10, i64 9292}
!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(13523)) 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(13523), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4jpgd12jpeg_decoder4initEPNS_19jpeg_decoder_streamEj(ptr noundef nonnull align 8 dereferenceable(13523) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 200
  store i32 %2, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 208
  %6 = getelementptr inbounds i8, ptr %0, i64 13512
  store i32 0, ptr %6, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %0, i64 13520
  store i8 0, ptr %7, align 8, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %0, i64 224
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  store ptr %1, ptr %8, align 8, !tbaa !15
  %9 = getelementptr inbounds i8, ptr %0, i64 232
  store i32 0, ptr %9, align 8, !tbaa !16
  %10 = getelementptr inbounds i8, ptr %0, i64 236
  store i64 0, ptr %10, align 4
  %11 = getelementptr inbounds i8, ptr %0, i64 248
  %12 = getelementptr inbounds i8, ptr %0, i64 672
  %13 = getelementptr inbounds i8, ptr %0, i64 904
  %14 = getelementptr inbounds i8, ptr %0, i64 824
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(420) %11, i8 0, i64 420, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(148) %12, i8 0, i64 148, i1 false)
  store ptr %13, ptr %14, align 8, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %0, i64 832
  %16 = getelementptr inbounds i8, ptr %0, i64 13521
  store i8 0, ptr %16, align 1, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %0, i64 9296
  %18 = getelementptr inbounds i8, ptr %0, i64 9384
  %19 = getelementptr inbounds i8, ptr %0, i64 13522
  store i8 0, ptr %19, align 2, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %0, i64 13516
  store i32 0, ptr %20, align 4, !tbaa !20
  %21 = getelementptr inbounds i8, ptr %0, i64 13496
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(8456) %15, i8 0, i64 8456, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %17, i8 0, i64 48, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %18, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %21, i8 0, i64 16, i1 false)
  tail call void @_ZN4jpgd12jpeg_decoder14prep_in_bufferEv(ptr noundef nonnull align 8 dereferenceable(13523) %0)
  %22 = getelementptr inbounds i8, ptr %0, i64 9288
  store i32 16, ptr %22, align 8, !tbaa !21
  %23 = getelementptr inbounds i8, ptr %0, i64 9292
  store i32 0, ptr %23, align 4, !tbaa !22
  %24 = tail call noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13523) %0, i32 noundef 16)
  %25 = tail call noundef i32 @_ZN4jpgd12jpeg_decoder8get_bitsEi(ptr noundef nonnull align 8 dereferenceable(13523) %0, i32 noundef 16)
  %26 = getelementptr inbounds i8, ptr %0, i64 9344
  store <4 x i32> <i32 64, i32 64, i32 64, i32 64>, ptr %26, align 8, !tbaa !23
  %27 = getelementptr inbounds i8, ptr %0, i64 9360
  store <4 x i32> <i32 64, i32 64, i32 64, i32 64>, ptr %27, align 8, !tbaa !23
  %28 = getelementptr inbounds i8, ptr %0, i64 9376
  store i32 64, ptr %28, align 8, !tbaa !23
  %29 = getelementptr inbounds i8, ptr %0, i64 9380
  store i32 64, ptr %29, align 4, !tbaa !23
  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, !9, i64 200}
!6 = !{!"_ZTSN4jpgd12jpeg_decoderE", !7, i64 0, !9, i64 200, !10, i64 208, !9, i64 216, !9, i64 220, !10, i64 224, !9, i64 232, !7, i64 236, !7, i64 248, !7, i64 312, !7, i64 376, !9, i64 408, !9, i64 412, !7, i64 416, !7, i64 432, !7, i64 448, !7, i64 464, !7, i64 480, !7, i64 496, !9, i64 512, !7, i64 516, !7, i64 532, !7, i64 548, !9, i64 564, !9, i64 568, !9, i64 572, !9, i64 576, !9, i64 580, !9, i64 584, !9, i64 588, !9, i64 592, !9, i64 596, !9, i64 600, !7, i64 604, !9, i64 644, !9, i64 648, !9, i64 652, !9, i64 656, !9, i64 660, !9, i64 664, !7, i64 672, !7, i64 736, !7, i64 768, !9, i64 800, !7, i64 804, !10, i64 824, !9, i64 832, !9, i64 836, !7, i64 840, !7, i64 904, !7, i64 9224, !9, i64 9288, !9, i64 9292, !9, i64 9296, !9, i64 9300, !9, i64 9304, !9, i64 9308, !9, i64 9312, !9, i64 9316, !7, i64 9320, !10, i64 9336, !7, i64 9344, !10, i64 9384, !10, i64 9392, !7, i64 9400, !7, i64 10424, !7, i64 11448, !7, i64 12472, !10, i64 13496, !10, i64 13504, !11, i64 13512, !9, i64 13516, !12, i64 13520, !12, i64 13521, !12, i64 13522}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"_ZTSN4jpgd11jpgd_statusE", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!6, !11, i64 13512}
!14 = !{!6, !12, i64 13520}
!15 = !{!6, !10, i64 224}
!16 = !{!6, !9, i64 232}
!17 = !{!6, !10, i64 824}
!18 = !{!6, !12, i64 13521}
!19 = !{!6, !12, i64 13522}
!20 = !{!6, !9, i64 13516}
!21 = !{!6, !9, i64 9288}
!22 = !{!6, !9, i64 9292}
!23 = !{!9, !9, i64 0}


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