; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/modules/juce_graphics/image_formats/jpglib (jmemmgr)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.jpeg_common_struct = type { ptr, ptr, ptr, ptr, i8, i32 }
%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.my_memory_mgr = type { %struct.jpeg_memory_mgr, [2 x ptr], [2 x ptr], ptr, ptr, i64, i32 }
%struct.jpeg_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @jinit_memory_mgr(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.jpeg_common_struct, ptr %8, i32 0, i32 1
  store ptr null, ptr %9, align 8, !tbaa !9
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = call i64 @jpeg_mem_init(ptr noundef %10)
  store i64 %11, ptr %4, align 8, !tbaa !12
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call ptr @jpeg_get_small(ptr noundef %12, i64 noundef 168)
  store ptr %13, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %33

16:                                               ; preds = %1
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  call void @jpeg_mem_term(ptr noundef %17)
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.jpeg_common_struct, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %20, i32 0, i32 5
  store i32 54, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.jpeg_common_struct, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %24, i32 0, i32 6
  %26 = getelementptr inbounds [8 x i32], ptr %25, i64 0, i64 0
  store i32 0, ptr %26, align 4, !tbaa !17
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.jpeg_common_struct, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  call void %31(ptr noundef %32)
  br label %33

33:                                               ; preds = %16, %1
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.my_memory_mgr, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %35, i32 0, i32 0
  store ptr @alloc_small, ptr %36, align 8, !tbaa !19
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.my_memory_mgr, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %38, i32 0, i32 1
  store ptr @alloc_large, ptr %39, align 8, !tbaa !22
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.my_memory_mgr, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %41, i32 0, i32 2
  store ptr @alloc_sarray, ptr %42, align 8, !tbaa !23
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.my_memory_mgr, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %44, i32 0, i32 3
  store ptr @alloc_barray, ptr %45, align 8, !tbaa !24
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.my_memory_mgr, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %47, i32 0, i32 4
  store ptr @request_virt_sarray, ptr %48, align 8, !tbaa !25
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.my_memory_mgr, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %50, i32 0, i32 5
  store ptr @request_virt_barray, ptr %51, align 8, !tbaa !26
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.my_memory_mgr, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %53, i32 0, i32 6
  store ptr @realize_virt_arrays, ptr %54, align 8, !tbaa !27
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.my_memory_mgr, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %56, i32 0, i32 7
  store ptr @access_virt_sarray, ptr %57, align 8, !tbaa !28
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.my_memory_mgr, ptr %58, i32 0, i32 0
  %60 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %59, i32 0, i32 8
  store ptr @access_virt_barray, ptr %60, align 8, !tbaa !29
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.my_memory_mgr, ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %62, i32 0, i32 9
  store ptr @free_pool, ptr %63, align 8, !tbaa !30
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.my_memory_mgr, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %65, i32 0, i32 10
  store ptr @self_destruct, ptr %66, align 8, !tbaa !31
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.my_memory_mgr, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %68, i32 0, i32 12
  store i64 1000000000, ptr %69, align 8, !tbaa !32
  %70 = load i64, ptr %4, align 8, !tbaa !12
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.my_memory_mgr, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %72, i32 0, i32 11
  store i64 %70, ptr %73, align 8, !tbaa !33
  store i32 1, ptr %5, align 4, !tbaa !34
  br label %74

74:                                               ; preds = %88, %33
  %75 = load i32, ptr %5, align 4, !tbaa !34
  %76 = icmp sge i32 %75, 0
  br i1 %76, label %77, label %91

77:                                               ; preds = %74
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.my_memory_mgr, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %5, align 4, !tbaa !34
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2 x ptr], ptr %79, i64 0, i64 %81
  store ptr null, ptr %82, align 8, !tbaa !5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.my_memory_mgr, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %5, align 4, !tbaa !34
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [2 x ptr], ptr %84, i64 0, i64 %86
  store ptr null, ptr %87, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %77
  %89 = load i32, ptr %5, align 4, !tbaa !34
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr %5, align 4, !tbaa !34
  br label %74, !llvm.loop !35

91:                                               ; preds = %74
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.my_memory_mgr, ptr %92, i32 0, i32 3
  store ptr null, ptr %93, align 8, !tbaa !37
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.my_memory_mgr, ptr %94, i32 0, i32 4
  store ptr null, ptr %95, align 8, !tbaa !38
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.my_memory_mgr, ptr %96, i32 0, i32 5
  store i64 168, ptr %97, align 8, !tbaa !39
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.my_memory_mgr, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.jpeg_common_struct, ptr %100, i32 0, i32 1
  store ptr %99, ptr %101, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %102 = call ptr @getenv(ptr noundef @.str) #4
  store ptr %102, ptr %6, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %126

104:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 120, ptr %7, align 1, !tbaa !17
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %105, ptr noundef @.str.1, ptr noundef %4, ptr noundef %7) #4
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %108, label %125

108:                                              ; preds = %104
  %109 = load i8, ptr %7, align 1, !tbaa !17
  %110 = sext i8 %109 to i32
  %111 = icmp eq i32 %110, 109
  br i1 %111, label %116, label %112

112:                                              ; preds = %108
  %113 = load i8, ptr %7, align 1, !tbaa !17
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %114, 77
  br i1 %115, label %116, label %119

116:                                              ; preds = %112, %108
  %117 = load i64, ptr %4, align 8, !tbaa !12
  %118 = mul nsw i64 %117, 1000
  store i64 %118, ptr %4, align 8, !tbaa !12
  br label %119

119:                                              ; preds = %116, %112
  %120 = load i64, ptr %4, align 8, !tbaa !12
  %121 = mul nsw i64 %120, 1000
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.my_memory_mgr, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %123, i32 0, i32 11
  store i64 %121, ptr %124, align 8, !tbaa !33
  br label %125

125:                                              ; preds = %119, %104
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  br label %126

126:                                              ; preds = %125, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

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

declare i64 @jpeg_mem_init(ptr noundef) #2

declare ptr @jpeg_get_small(ptr noundef, i64 noundef) #2

declare void @jpeg_mem_term(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @alloc_small(ptr noundef, i32 noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @alloc_large(ptr noundef, i32 noundef, i64 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @request_virt_sarray(ptr noundef, i32 noundef, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @request_virt_barray(ptr noundef, i32 noundef, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @realize_virt_arrays(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @access_virt_sarray(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i8 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @access_virt_barray(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i8 noundef zeroext) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @self_destruct(ptr noundef) #0

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #3

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

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 "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/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"jpeg_common_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !11, i64 36}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!16, !11, i64 40}
!16 = !{!"jpeg_error_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !7, i64 44, !11, i64 124, !13, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164}
!17 = !{!7, !7, i64 0}
!18 = !{!16, !6, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"", !21, i64 0, !7, i64 104, !7, i64 120, !6, i64 136, !6, i64 144, !13, i64 152, !11, i64 160}
!21 = !{!"jpeg_memory_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !13, i64 96}
!22 = !{!20, !6, i64 8}
!23 = !{!20, !6, i64 16}
!24 = !{!20, !6, i64 24}
!25 = !{!20, !6, i64 32}
!26 = !{!20, !6, i64 40}
!27 = !{!20, !6, i64 48}
!28 = !{!20, !6, i64 56}
!29 = !{!20, !6, i64 64}
!30 = !{!20, !6, i64 72}
!31 = !{!20, !6, i64 80}
!32 = !{!20, !13, i64 96}
!33 = !{!20, !13, i64 88}
!34 = !{!11, !11, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!20, !6, i64 136}
!38 = !{!20, !6, i64 144}
!39 = !{!20, !13, i64 152}


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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @jinit_memory_mgr(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca i64, align 8
  %3 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %4, align 8, !tbaa !5
  %5 = tail call i64 @jpeg_mem_init(ptr noundef %0) #6
  store i64 %5, ptr %2, align 8, !tbaa !11
  %6 = tail call ptr @jpeg_get_small(ptr noundef %0, i64 noundef 168) #6
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %14

8:                                                ; preds = %1
  tail call void @jpeg_mem_term(ptr noundef nonnull %0) #6
  %9 = load ptr, ptr %0, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %9, i64 40
  store i32 54, ptr %10, align 8, !tbaa !14
  %11 = getelementptr inbounds i8, ptr %9, i64 44
  store i32 0, ptr %11, align 4, !tbaa !16
  %12 = load ptr, ptr %0, align 8, !tbaa !13
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  tail call void %13(ptr noundef nonnull %0) #6
  br label %14

14:                                               ; preds = %8, %1
  store ptr @alloc_small, ptr %6, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr @alloc_large, ptr %15, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr @alloc_sarray, ptr %16, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr @alloc_barray, ptr %17, align 8, !tbaa !23
  %18 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr @request_virt_sarray, ptr %18, align 8, !tbaa !24
  %19 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr @request_virt_barray, ptr %19, align 8, !tbaa !25
  %20 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr @realize_virt_arrays, ptr %20, align 8, !tbaa !26
  %21 = getelementptr inbounds i8, ptr %6, i64 56
  store ptr @access_virt_sarray, ptr %21, align 8, !tbaa !27
  %22 = getelementptr inbounds i8, ptr %6, i64 64
  store ptr @access_virt_barray, ptr %22, align 8, !tbaa !28
  %23 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr @free_pool, ptr %23, align 8, !tbaa !29
  %24 = getelementptr inbounds i8, ptr %6, i64 80
  store ptr @self_destruct, ptr %24, align 8, !tbaa !30
  %25 = getelementptr inbounds i8, ptr %6, i64 96
  store i64 1000000000, ptr %25, align 8, !tbaa !31
  %26 = getelementptr inbounds i8, ptr %6, i64 88
  store i64 %5, ptr %26, align 8, !tbaa !32
  %27 = getelementptr inbounds i8, ptr %6, i64 104
  %28 = getelementptr inbounds i8, ptr %6, i64 152
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %27, i8 0, i64 48, i1 false)
  store i64 168, ptr %28, align 8, !tbaa !33
  store ptr %6, ptr %4, align 8, !tbaa !5
  %29 = tail call ptr @getenv(ptr noundef nonnull @.str) #6
  %.not = icmp eq ptr %29, null
  br i1 %.not, label %39, label %30

30:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  store i8 120, ptr %3, align 1, !tbaa !16
  %31 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %29, ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3) #6
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %30
  %34 = load i8, ptr %3, align 1
  %35 = and i8 %34, -33
  %or.cond = icmp eq i8 %35, 77
  %.pre = load i64, ptr %2, align 8, !tbaa !11
  %36 = mul nsw i64 %.pre, 1000
  %spec.select = select i1 %or.cond, i64 %36, i64 %.pre
  %37 = mul nsw i64 %spec.select, 1000
  store i64 %37, ptr %26, align 8, !tbaa !32
  br label %38

38:                                               ; preds = %33, %30
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %39

39:                                               ; preds = %38, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void
}

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

declare i64 @jpeg_mem_init(ptr noundef) local_unnamed_addr #2

declare ptr @jpeg_get_small(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @jpeg_mem_term(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden ptr @alloc_small(ptr noundef, i32 noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @alloc_large(ptr noundef, i32 noundef, i64 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @request_virt_sarray(ptr noundef, i32 noundef, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @request_virt_barray(ptr noundef, i32 noundef, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @realize_virt_arrays(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @access_virt_sarray(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i8 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @access_virt_barray(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i8 noundef zeroext) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @self_destruct(ptr noundef) #0

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

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

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 = { mustprogress 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 = { nofree nounwind memory(read) "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 "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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !7, i64 8}
!6 = !{!"jpeg_common_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !8, i64 32, !10, i64 36}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !10, i64 40}
!15 = !{!"jpeg_error_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !8, i64 44, !10, i64 124, !12, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!16 = !{!8, !8, i64 0}
!17 = !{!15, !7, i64 0}
!18 = !{!19, !7, i64 0}
!19 = !{!"", !20, i64 0, !8, i64 104, !8, i64 120, !7, i64 136, !7, i64 144, !12, i64 152, !10, i64 160}
!20 = !{!"jpeg_memory_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !12, i64 88, !12, i64 96}
!21 = !{!19, !7, i64 8}
!22 = !{!19, !7, i64 16}
!23 = !{!19, !7, i64 24}
!24 = !{!19, !7, i64 32}
!25 = !{!19, !7, i64 40}
!26 = !{!19, !7, i64 48}
!27 = !{!19, !7, i64 56}
!28 = !{!19, !7, i64 64}
!29 = !{!19, !7, i64 72}
!30 = !{!19, !7, i64 80}
!31 = !{!19, !12, i64 96}
!32 = !{!19, !12, i64 88}
!33 = !{!19, !12, i64 152}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass