; LLVM IR from ewconnell/Netlib :: Sources/ImageCodecs (jpeg)

; 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.CDecoderInfo = type { ptr, ptr, i64, i64, i32, i64, i64, i32 }
%struct.JpegContext = type { %struct.jpeg_decompress_struct, %struct.ErrorMgr }
%struct.jpeg_decompress_struct = type { ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i32, i32, i32, [16 x i8], [16 x i8], [16 x i8], i32, i32, i8, i8, i8, i16, i16, i32, i8, i32, 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 }
%struct.ErrorMgr = type { %struct.jpeg_error_mgr, [1 x %struct.__jmp_buf_tag] }
%struct.jpeg_error_mgr = type { ptr, ptr, ptr, ptr, ptr, i32, %union.anon, i32, i64, ptr, i32, ptr, i32, i32 }
%union.anon = type { [8 x i32], [48 x i8] }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

; Function Attrs: nounwind uwtable
declare dso_local void @onErrorExit(ptr noundef) #0

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

declare void @jpeg_destroy_decompress(ptr noundef) #2

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

declare ptr @jpeg_std_error(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @jpegDecodeInfo(ptr dead_on_unwind noalias writable sret(%struct.CDecoderInfo) align 8 %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  store i32 %3, ptr %7, align 4, !tbaa !11
  %11 = load i32, ptr %7, align 4, !tbaa !11
  %12 = icmp eq i32 %11, 2
  br i1 %12, label %13, label %14

13:                                               ; preds = %4
  store i32 1, ptr %7, align 4, !tbaa !11
  br label %14

14:                                               ; preds = %13, %4
  %15 = load i32, ptr %7, align 4, !tbaa !11
  %16 = icmp eq i32 %15, 4
  br i1 %16, label %17, label %18

17:                                               ; preds = %14
  store i32 3, ptr %7, align 4, !tbaa !11
  br label %18

18:                                               ; preds = %17, %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %19 = call noalias ptr @malloc(i64 noundef 1024) #7
  store ptr %19, ptr %8, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 1024, i1 false)
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 0
  store ptr %21, ptr %22, align 8, !tbaa !13
  %23 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 2
  store i64 3, ptr %23, align 8, !tbaa !15
  %24 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 2
  %25 = load i64, ptr %24, align 8, !tbaa !15
  %26 = mul i64 %25, 8
  %27 = call noalias ptr @malloc(i64 noundef %26) #7
  %28 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  store ptr %27, ptr %28, align 8, !tbaa !16
  %29 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 7
  store i32 0, ptr %29, align 8, !tbaa !17
  %30 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 4
  store i32 0, ptr %30, align 8, !tbaa !18
  %31 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 5
  store i64 1, ptr %31, align 8, !tbaa !19
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.JpegContext, ptr %32, i32 0, i32 1
  %34 = getelementptr inbounds %struct.ErrorMgr, ptr %33, i32 0, i32 0
  %35 = call ptr @jpeg_std_error(ptr noundef %34)
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.JpegContext, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %37, i32 0, i32 0
  store ptr %35, ptr %38, align 8, !tbaa !20
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.JpegContext, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %struct.ErrorMgr, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %41, i32 0, i32 0
  store ptr @onErrorExit, ptr %42, align 8, !tbaa !27
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.JpegContext, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds %struct.ErrorMgr, ptr %44, i32 0, i32 1
  %46 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %45, i64 0, i64 0
  %47 = call i32 @_setjmp(ptr noundef %46) #8
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %53

49:                                               ; preds = %18
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.JpegContext, ptr %50, i32 0, i32 0
  call void @jpeg_destroy_decompress(ptr noundef %51)
  %52 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 7
  store i32 1, ptr %52, align 8, !tbaa !17
  store i32 1, ptr %9, align 4
  br label %118

53:                                               ; preds = %18
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.JpegContext, ptr %54, i32 0, i32 0
  call void @jpeg_CreateDecompress(ptr noundef %55, i32 noundef 80, i64 noundef 656)
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.JpegContext, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i64, ptr %6, align 8, !tbaa !9
  call void @jpeg_mem_src(ptr noundef %57, ptr noundef %58, i64 noundef %59)
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.JpegContext, ptr %60, i32 0, i32 0
  %62 = call i32 @jpeg_read_header(ptr noundef %61, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %63 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  store ptr %64, ptr %10, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.JpegContext, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %66, i32 0, i32 8
  %68 = load i32, ptr %67, align 4, !tbaa !28
  %69 = zext i32 %68 to i64
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds i64, ptr %70, i64 0
  store i64 %69, ptr %71, align 8, !tbaa !9
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.JpegContext, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %73, i32 0, i32 7
  %75 = load i32, ptr %74, align 8, !tbaa !29
  %76 = zext i32 %75 to i64
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds i64, ptr %77, i64 1
  store i64 %76, ptr %78, align 8, !tbaa !9
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.JpegContext, ptr %79, i32 0, i32 0
  %81 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %80, i32 0, i32 9
  %82 = load i32, ptr %81, align 8, !tbaa !30
  %83 = sext i32 %82 to i64
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds i64, ptr %84, i64 2
  store i64 %83, ptr %85, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 0, ptr %86, align 8, !tbaa !31
  %87 = load i32, ptr %7, align 4, !tbaa !11
  switch i32 %87, label %116 [
    i32 1, label %88
    i32 3, label %102
  ]

88:                                               ; preds = %53
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.JpegContext, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %90, i32 0, i32 11
  %92 = load i32, ptr %91, align 8, !tbaa !32
  %93 = icmp ne i32 %92, 1
  br i1 %93, label %94, label %101

94:                                               ; preds = %88
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.JpegContext, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %96, i32 0, i32 11
  store i32 1, ptr %97, align 8, !tbaa !32
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds i64, ptr %98, i64 2
  store i64 1, ptr %99, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 1, ptr %100, align 8, !tbaa !31
  br label %101

101:                                              ; preds = %94, %88
  br label %117

102:                                              ; preds = %53
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.JpegContext, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %104, i32 0, i32 11
  %106 = load i32, ptr %105, align 8, !tbaa !32
  %107 = icmp ne i32 %106, 2
  br i1 %107, label %108, label %115

108:                                              ; preds = %102
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.JpegContext, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %110, i32 0, i32 11
  store i32 2, ptr %111, align 8, !tbaa !32
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds i64, ptr %112, i64 2
  store i64 3, ptr %113, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 1, ptr %114, align 8, !tbaa !31
  br label %115

115:                                              ; preds = %108, %102
  br label %117

116:                                              ; preds = %53
  br label %117

117:                                              ; preds = %116, %115, %101
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %118

118:                                              ; preds = %117, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  ret void
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

declare void @jpeg_CreateDecompress(ptr noundef, i32 noundef, i64 noundef) #2

declare void @jpeg_mem_src(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @jpeg_read_header(ptr noundef, i32 noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !10, i64 40, !10, i64 48, !12, i64 56}
!15 = !{!14, !10, i64 16}
!16 = !{!14, !6, i64 8}
!17 = !{!14, !12, i64 56}
!18 = !{!14, !12, i64 32}
!19 = !{!14, !10, i64 40}
!20 = !{!21, !6, i64 0}
!21 = !{!"", !22, i64 0, !25, i64 656}
!22 = !{!"jpeg_decompress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !23, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !12, i64 152, !12, i64 156, !6, i64 160, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !6, i64 192, !7, i64 200, !7, i64 232, !7, i64 264, !12, i64 296, !6, i64 304, !12, i64 312, !12, i64 316, !12, i64 320, !7, i64 324, !7, i64 340, !7, i64 356, !12, i64 372, !12, i64 376, !7, i64 380, !7, i64 381, !7, i64 382, !24, i64 384, !24, i64 386, !12, i64 388, !7, i64 392, !12, i64 396, !6, i64 400, !12, i64 408, !12, i64 412, !12, i64 416, !12, i64 420, !12, i64 424, !6, i64 432, !12, i64 440, !7, i64 448, !12, i64 480, !12, i64 484, !12, i64 488, !7, i64 492, !12, i64 532, !12, i64 536, !12, i64 540, !12, i64 544, !12, i64 548, !6, i64 552, !12, i64 560, !12, i64 564, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640, !6, i64 648}
!23 = !{!"double", !7, i64 0}
!24 = !{!"short", !7, i64 0}
!25 = !{!"ErrorMgr", !26, i64 0, !7, i64 168}
!26 = !{!"jpeg_error_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !7, i64 44, !12, i64 124, !10, i64 128, !6, i64 136, !12, i64 144, !6, i64 152, !12, i64 160, !12, i64 164}
!27 = !{!21, !6, i64 656}
!28 = !{!21, !12, i64 52}
!29 = !{!21, !12, i64 48}
!30 = !{!21, !12, i64 56}
!31 = !{!14, !10, i64 48}
!32 = !{!21, !12, i64 64}


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

%struct.CDecoderInfo = type { ptr, ptr, i64, i64, i32, i64, i64, i32 }

; Function Attrs: nounwind uwtable
declare dso_local void @onErrorExit(ptr noundef) #0

declare void @jpeg_destroy_decompress(ptr noundef) local_unnamed_addr #1

declare ptr @jpeg_std_error(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @jpegDecodeInfo(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.CDecoderInfo) align 8 %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %calloc = call dereferenceable_or_null(1024) ptr @calloc(i64 1, i64 1024)
  store ptr %calloc, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 3, ptr %5, align 8, !tbaa !12
  %6 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %6, ptr %7, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 0, ptr %8, align 8, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 0, ptr %9, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  store i64 1, ptr %10, align 8, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %calloc, i64 656
  %12 = call ptr @jpeg_std_error(ptr noundef nonnull %11) #6
  store ptr %12, ptr %calloc, align 8, !tbaa !17
  store ptr @onErrorExit, ptr %11, align 8, !tbaa !24
  %13 = getelementptr inbounds i8, ptr %calloc, i64 824
  %14 = call i32 @_setjmp(ptr noundef nonnull %13) #7
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %16, label %15

15:                                               ; preds = %4
  call void @jpeg_destroy_decompress(ptr noundef nonnull %calloc) #6
  store i32 1, ptr %8, align 8, !tbaa !14
  br label %40

16:                                               ; preds = %4
  %17 = icmp eq i32 %3, 2
  %spec.store.select = select i1 %17, i32 1, i32 %3
  %18 = icmp eq i32 %spec.store.select, 4
  %spec.store.select1 = select i1 %18, i32 3, i32 %spec.store.select
  call void @jpeg_CreateDecompress(ptr noundef nonnull %calloc, i32 noundef 80, i64 noundef 656) #6
  call void @jpeg_mem_src(ptr noundef nonnull %calloc, ptr noundef %1, i64 noundef %2) #6
  %19 = call i32 @jpeg_read_header(ptr noundef nonnull %calloc, i32 noundef 1) #6
  %20 = getelementptr inbounds i8, ptr %calloc, i64 52
  %21 = load i32, ptr %20, align 4, !tbaa !25
  %22 = zext i32 %21 to i64
  store i64 %22, ptr %6, align 8, !tbaa !26
  %23 = getelementptr inbounds i8, ptr %calloc, i64 48
  %24 = load i32, ptr %23, align 8, !tbaa !27
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %25, ptr %26, align 8, !tbaa !26
  %27 = getelementptr inbounds i8, ptr %calloc, i64 56
  %28 = load i32, ptr %27, align 8, !tbaa !28
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr %6, i64 16
  store i64 %29, ptr %30, align 8, !tbaa !26
  %31 = getelementptr inbounds i8, ptr %0, i64 48
  store i64 0, ptr %31, align 8, !tbaa !29
  switch i32 %spec.store.select1, label %40 [
    i32 1, label %32
    i32 3, label %36
  ]

32:                                               ; preds = %16
  %33 = getelementptr inbounds i8, ptr %calloc, i64 64
  %34 = load i32, ptr %33, align 8, !tbaa !30
  %.not28 = icmp eq i32 %34, 1
  br i1 %.not28, label %40, label %35

35:                                               ; preds = %32
  store i32 1, ptr %33, align 8, !tbaa !30
  store i64 1, ptr %30, align 8, !tbaa !26
  store i64 1, ptr %31, align 8, !tbaa !29
  br label %40

36:                                               ; preds = %16
  %37 = getelementptr inbounds i8, ptr %calloc, i64 64
  %38 = load i32, ptr %37, align 8, !tbaa !30
  %.not27 = icmp eq i32 %38, 2
  br i1 %.not27, label %40, label %39

39:                                               ; preds = %36
  store i32 2, ptr %37, align 8, !tbaa !30
  store i64 3, ptr %30, align 8, !tbaa !26
  store i64 1, ptr %31, align 8, !tbaa !29
  br label %40

40:                                               ; preds = %35, %32, %39, %36, %16, %15
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

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

declare void @jpeg_CreateDecompress(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

declare void @jpeg_mem_src(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @jpeg_read_header(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #4

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 "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 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #5 = { nounwind allocsize(0) }
attributes #6 = { nounwind }
attributes #7 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !10, i64 40, !10, i64 48, !11, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !11, i64 56}
!15 = !{!6, !11, i64 32}
!16 = !{!6, !10, i64 40}
!17 = !{!18, !7, i64 0}
!18 = !{!"", !19, i64 0, !22, i64 656}
!19 = !{!"jpeg_decompress_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !11, i64 36, !7, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !20, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !11, i64 156, !7, i64 160, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !7, i64 192, !8, i64 200, !8, i64 232, !8, i64 264, !11, i64 296, !7, i64 304, !11, i64 312, !11, i64 316, !11, i64 320, !8, i64 324, !8, i64 340, !8, i64 356, !11, i64 372, !11, i64 376, !8, i64 380, !8, i64 381, !8, i64 382, !21, i64 384, !21, i64 386, !11, i64 388, !8, i64 392, !11, i64 396, !7, i64 400, !11, i64 408, !11, i64 412, !11, i64 416, !11, i64 420, !11, i64 424, !7, i64 432, !11, i64 440, !8, i64 448, !11, i64 480, !11, i64 484, !11, i64 488, !8, i64 492, !11, i64 532, !11, i64 536, !11, i64 540, !11, i64 544, !11, i64 548, !7, i64 552, !11, i64 560, !11, i64 564, !7, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648}
!20 = !{!"double", !8, i64 0}
!21 = !{!"short", !8, i64 0}
!22 = !{!"ErrorMgr", !23, i64 0, !8, i64 168}
!23 = !{!"jpeg_error_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !8, i64 44, !11, i64 124, !10, i64 128, !7, i64 136, !11, i64 144, !7, i64 152, !11, i64 160, !11, i64 164}
!24 = !{!18, !7, i64 656}
!25 = !{!18, !11, i64 52}
!26 = !{!10, !10, i64 0}
!27 = !{!18, !11, i64 48}
!28 = !{!18, !11, i64 56}
!29 = !{!6, !10, i64 48}
!30 = !{!18, !11, i64 64}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass