; LLVM IR from JayXon/Leanify :: lib/LZMA (LzmaEnc)

; 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._CLzmaEncProps = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64 }
%struct.CLzmaEnc = type { ptr, %struct._IMatchFinder, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], i32, i32, ptr, %struct.CRangeEnc, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, %struct._CMatchFinderMt, %struct._CMatchFinder, [128 x i8], [128 x i32], [548 x i32], [16 x i32], [4 x [64 x i32]], [4 x [128 x i32]], [16 x i16], [12 x i16], [12 x i16], [12 x i16], [12 x i16], [12 x [16 x i16]], [12 x [16 x i16]], [4 x [64 x i16]], [128 x i16], %struct.CLenEnc, %struct.CLenEnc, [16384 x i8], %struct.CLenPriceEnc, %struct.CLenPriceEnc, [2048 x %struct.COptimal], %struct.CSaveState, [128 x i8] }
%struct._IMatchFinder = type { ptr, ptr, ptr, ptr, ptr }
%struct.CRangeEnc = type { i32, i32, i64, i64, ptr, ptr, ptr, ptr, i64, i32 }
%struct._CMatchFinderMt = type { ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i32, ptr, ptr, i32, [1 x i32], %struct._CMtSync, [128 x i8], ptr, i32, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32, %struct._CMtSync, ptr, ptr }
%struct._CMtSync = type { i32, %struct._CThread, i64, i32, i32, i32, i32, i32, i32, %struct._CEvent, %struct._CEvent, %struct._CSemaphore, %struct._CSemaphore, %struct._CCriticalSection }
%struct._CThread = type { i64, i32 }
%struct._CEvent = type { i32, i32, i32, %union.pthread_mutex_t, %union.pthread_cond_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct._CSemaphore = type { i32, i32, i32, %union.pthread_mutex_t, %union.pthread_cond_t }
%struct._CCriticalSection = type { %union.pthread_mutex_t }
%struct._CMatchFinder = type { ptr, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32, ptr, ptr, i32, i32, ptr, ptr, i32, i32, i32, i32, i64, i32, i32, i32, i32, [256 x i32], i64, i64 }
%struct.CLenEnc = type { [256 x i16], [256 x i16] }
%struct.CLenPriceEnc = type { i32, [16 x [272 x i32]] }
%struct.COptimal = type { i32, i16, i16, i32, i32, [4 x i32] }
%struct.CSaveState = type { ptr, i32, [4 x i32], [16 x i16], [12 x i16], [12 x i16], [12 x i16], [12 x i16], [12 x [16 x i16]], [12 x [16 x i16]], [4 x [64 x i16]], [128 x i16], %struct.CLenEnc, %struct.CLenEnc }

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

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

; Function Attrs: 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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @LzmaEnc_SetProps(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct._CLzmaEncProps, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %12, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #3
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %13, i64 64, i1 false), !tbaa.struct !9
  call void @LzmaEncProps_Normalize(ptr noundef %7)
  %14 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 2
  %15 = load i32, ptr %14, align 8, !tbaa !14
  %16 = icmp sgt i32 %15, 8
  br i1 %16, label %25, label %17

17:                                               ; preds = %2
  %18 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 3
  %19 = load i32, ptr %18, align 4, !tbaa !16
  %20 = icmp sgt i32 %19, 4
  br i1 %20, label %25, label %21

21:                                               ; preds = %17
  %22 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 4
  %23 = load i32, ptr %22, align 8, !tbaa !17
  %24 = icmp sgt i32 %23, 4
  br i1 %24, label %25, label %26

25:                                               ; preds = %21, %17, %2
  store i32 5, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %139

26:                                               ; preds = %21
  %27 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !18
  %29 = icmp ugt i32 %28, -268435456
  br i1 %29, label %30, label %32

30:                                               ; preds = %26
  %31 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 1
  store i32 -268435456, ptr %31, align 4, !tbaa !18
  br label %32

32:                                               ; preds = %30, %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %33 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !18
  %35 = zext i32 %34 to i64
  store i64 %35, ptr %9, align 8, !tbaa !12
  %36 = load i64, ptr %9, align 8, !tbaa !12
  %37 = icmp ugt i64 %36, 8589934592
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  store i32 5, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %40

39:                                               ; preds = %32
  store i32 0, ptr %8, align 4
  br label %40

40:                                               ; preds = %39, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %41 = load i32, ptr %8, align 4
  switch i32 %41, label %139 [
    i32 0, label %42
  ]

42:                                               ; preds = %40
  %43 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !18
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.CLzmaEnc, ptr %45, i32 0, i32 29
  store i32 %44, ptr %46, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %47 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 6
  %48 = load i32, ptr %47, align 8, !tbaa !34
  store i32 %48, ptr %10, align 4, !tbaa !10
  %49 = load i32, ptr %10, align 4, !tbaa !10
  %50 = icmp ult i32 %49, 5
  br i1 %50, label %51, label %52

51:                                               ; preds = %42
  store i32 5, ptr %10, align 4, !tbaa !10
  br label %52

52:                                               ; preds = %51, %42
  %53 = load i32, ptr %10, align 4, !tbaa !10
  %54 = icmp ugt i32 %53, 273
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  store i32 273, ptr %10, align 4, !tbaa !10
  br label %56

56:                                               ; preds = %55, %52
  %57 = load i32, ptr %10, align 4, !tbaa !10
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.CLzmaEnc, ptr %58, i32 0, i32 8
  store i32 %57, ptr %59, align 8, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %60 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 2
  %61 = load i32, ptr %60, align 8, !tbaa !14
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.CLzmaEnc, ptr %62, i32 0, i32 16
  store i32 %61, ptr %63, align 4, !tbaa !36
  %64 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 3
  %65 = load i32, ptr %64, align 4, !tbaa !16
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.CLzmaEnc, ptr %66, i32 0, i32 17
  store i32 %65, ptr %67, align 8, !tbaa !37
  %68 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 4
  %69 = load i32, ptr %68, align 8, !tbaa !17
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.CLzmaEnc, ptr %70, i32 0, i32 18
  store i32 %69, ptr %71, align 4, !tbaa !38
  %72 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 5
  %73 = load i32, ptr %72, align 4, !tbaa !39
  %74 = icmp eq i32 %73, 0
  %75 = zext i1 %74 to i32
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.CLzmaEnc, ptr %76, i32 0, i32 20
  store i32 %75, ptr %77, align 4, !tbaa !40
  %78 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 7
  %79 = load i32, ptr %78, align 4, !tbaa !41
  %80 = icmp ne i32 %79, 0
  %81 = zext i1 %80 to i64
  %82 = select i1 %80, i32 1, i32 0
  %83 = trunc i32 %82 to i8
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.CLzmaEnc, ptr %84, i32 0, i32 33
  %86 = getelementptr inbounds %struct._CMatchFinder, ptr %85, i32 0, i32 8
  store i8 %83, ptr %86, align 1, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 4, ptr %11, align 4, !tbaa !10
  %87 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 7
  %88 = load i32, ptr %87, align 4, !tbaa !41
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %104

90:                                               ; preds = %56
  %91 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 8
  %92 = load i32, ptr %91, align 8, !tbaa !43
  %93 = icmp slt i32 %92, 2
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  store i32 2, ptr %11, align 4, !tbaa !10
  br label %103

95:                                               ; preds = %90
  %96 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 8
  %97 = load i32, ptr %96, align 8, !tbaa !43
  %98 = icmp slt i32 %97, 4
  br i1 %98, label %99, label %102

99:                                               ; preds = %95
  %100 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 8
  %101 = load i32, ptr %100, align 8, !tbaa !43
  store i32 %101, ptr %11, align 4, !tbaa !10
  br label %102

102:                                              ; preds = %99, %95
  br label %103

103:                                              ; preds = %102, %94
  br label %104

104:                                              ; preds = %103, %56
  %105 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 8
  %106 = load i32, ptr %105, align 8, !tbaa !43
  %107 = icmp sge i32 %106, 5
  br i1 %107, label %108, label %109

108:                                              ; preds = %104
  store i32 5, ptr %11, align 4, !tbaa !10
  br label %109

109:                                              ; preds = %108, %104
  %110 = load i32, ptr %11, align 4, !tbaa !10
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.CLzmaEnc, ptr %111, i32 0, i32 33
  %113 = getelementptr inbounds %struct._CMatchFinder, ptr %112, i32 0, i32 21
  store i32 %110, ptr %113, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  %114 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 9
  %115 = load i32, ptr %114, align 4, !tbaa !45
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.CLzmaEnc, ptr %116, i32 0, i32 33
  %118 = getelementptr inbounds %struct._CMatchFinder, ptr %117, i32 0, i32 15
  store i32 %115, ptr %118, align 4, !tbaa !46
  %119 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 10
  %120 = load i32, ptr %119, align 8, !tbaa !47
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.CLzmaEnc, ptr %121, i32 0, i32 21
  store i32 %120, ptr %122, align 8, !tbaa !48
  %123 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 11
  %124 = load i32, ptr %123, align 4, !tbaa !49
  %125 = icmp sgt i32 %124, 1
  %126 = zext i1 %125 to i32
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.CLzmaEnc, ptr %127, i32 0, i32 23
  store i32 %126, ptr %128, align 8, !tbaa !50
  %129 = getelementptr inbounds %struct._CLzmaEncProps, ptr %7, i32 0, i32 13
  %130 = load i64, ptr %129, align 8, !tbaa !51
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.CLzmaEnc, ptr %131, i32 0, i32 32
  %133 = getelementptr inbounds %struct._CMatchFinderMt, ptr %132, i32 0, i32 28
  %134 = getelementptr inbounds %struct._CMtSync, ptr %133, i32 0, i32 2
  store i64 %130, ptr %134, align 8, !tbaa !52
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.CLzmaEnc, ptr %135, i32 0, i32 32
  %137 = getelementptr inbounds %struct._CMatchFinderMt, ptr %136, i32 0, i32 13
  %138 = getelementptr inbounds %struct._CMtSync, ptr %137, i32 0, i32 2
  store i64 %130, ptr %138, align 8, !tbaa !53
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %139

139:                                              ; preds = %109, %40, %25
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %140 = load i32, ptr %3, align 4
  ret i32 %140
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 4, !10, i64 20, i64 4, !10, i64 24, i64 4, !10, i64 28, i64 4, !10, i64 32, i64 4, !10, i64 36, i64 4, !10, i64 40, i64 4, !10, i64 44, i64 4, !10, i64 48, i64 8, !12, i64 56, i64 8, !12}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !11, i64 8}
!15 = !{!"_CLzmaEncProps", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !13, i64 48, !13, i64 56}
!16 = !{!15, !11, i64 12}
!17 = !{!15, !11, i64 16}
!18 = !{!15, !11, i64 4}
!19 = !{!20, !11, i64 244}
!20 = !{!"", !6, i64 0, !21, i64 8, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !7, i64 80, !11, i64 96, !11, i64 100, !6, i64 104, !22, i64 112, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !13, i64 224, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !23, i64 256, !30, i64 1576, !7, i64 2736, !7, i64 2864, !7, i64 3376, !7, i64 5568, !7, i64 5632, !7, i64 6656, !7, i64 8704, !7, i64 8736, !7, i64 8760, !7, i64 8784, !7, i64 8808, !7, i64 8832, !7, i64 9216, !7, i64 9600, !7, i64 10112, !31, i64 10368, !31, i64 11392, !7, i64 12416, !32, i64 28800, !32, i64 46212, !7, i64 63624, !33, i64 129160, !7, i64 132904}
!21 = !{!"_IMatchFinder", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!22 = !{!"", !11, i64 0, !11, i64 4, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !11, i64 64}
!23 = !{!"_CMatchFinderMt", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !6, i64 40, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !11, i64 72, !7, i64 76, !24, i64 80, !7, i64 592, !6, i64 720, !11, i64 728, !11, i64 732, !11, i64 736, !11, i64 740, !6, i64 744, !11, i64 752, !11, i64 756, !11, i64 760, !6, i64 768, !11, i64 776, !11, i64 780, !11, i64 784, !24, i64 792, !6, i64 1304, !6, i64 1312}
!24 = !{!"_CMtSync", !11, i64 0, !25, i64 8, !13, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !27, i64 56, !27, i64 160, !28, i64 264, !28, i64 368, !29, i64 472}
!25 = !{!"_CThread", !26, i64 0, !11, i64 8}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_CEvent", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !7, i64 56}
!28 = !{!"_CSemaphore", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !7, i64 56}
!29 = !{!"_CCriticalSection", !7, i64 0}
!30 = !{!"_CMatchFinder", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !11, i64 36, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !6, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !26, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !7, i64 120, !26, i64 1144, !13, i64 1152}
!31 = !{!"", !7, i64 0, !7, i64 512}
!32 = !{!"", !11, i64 0, !7, i64 4}
!33 = !{!"", !6, i64 0, !11, i64 8, !7, i64 12, !7, i64 28, !7, i64 60, !7, i64 84, !7, i64 108, !7, i64 132, !7, i64 156, !7, i64 540, !7, i64 924, !7, i64 1436, !31, i64 1692, !31, i64 2716}
!34 = !{!15, !11, i64 24}
!35 = !{!20, !11, i64 72}
!36 = !{!20, !11, i64 188}
!37 = !{!20, !11, i64 192}
!38 = !{!20, !11, i64 196}
!39 = !{!15, !11, i64 20}
!40 = !{!20, !11, i64 204}
!41 = !{!15, !11, i64 28}
!42 = !{!20, !7, i64 1609}
!43 = !{!15, !11, i64 32}
!44 = !{!20, !11, i64 1668}
!45 = !{!15, !11, i64 36}
!46 = !{!20, !11, i64 1636}
!47 = !{!15, !11, i64 40}
!48 = !{!20, !11, i64 208}
!49 = !{!15, !11, i64 44}
!50 = !{!20, !11, i64 216}
!51 = !{!15, !13, i64 56}
!52 = !{!20, !13, i64 1072}
!53 = !{!20, !13, i64 360}


; 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._CLzmaEncProps = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64 }

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 6) i32 @LzmaEnc_SetProps(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct._CLzmaEncProps, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef nonnull align 8 dereferenceable(64) %1, i64 64, i1 false), !tbaa.struct !5
  call void @LzmaEncProps_Normalize(ptr noundef nonnull %3)
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !12
  %6 = icmp sgt i32 %5, 8
  %7 = getelementptr inbounds i8, ptr %3, i64 12
  %8 = load i32, ptr %7, align 4
  %9 = icmp sgt i32 %8, 4
  %or.cond = select i1 %6, i1 true, i1 %9
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  %11 = load i32, ptr %10, align 8
  %12 = icmp sgt i32 %11, 4
  %or.cond5 = select i1 %or.cond, i1 true, i1 %12
  br i1 %or.cond5, label %51, label %13

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %3, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !14
  %spec.select33 = call i32 @llvm.umin.i32(i32 %15, i32 -268435456)
  %16 = getelementptr inbounds i8, ptr %0, i64 244
  store i32 %spec.select33, ptr %16, align 4, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %3, i64 24
  %18 = load i32, ptr %17, align 8, !tbaa !31
  %spec.store.select = call i32 @llvm.umax.i32(i32 %18, i32 5)
  %spec.store.select6 = call i32 @llvm.umin.i32(i32 %spec.store.select, i32 273)
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %spec.store.select6, ptr %19, align 8, !tbaa !32
  %20 = getelementptr inbounds i8, ptr %0, i64 188
  store i32 %5, ptr %20, align 4, !tbaa !33
  %21 = getelementptr inbounds i8, ptr %0, i64 192
  store i32 %8, ptr %21, align 8, !tbaa !34
  %22 = getelementptr inbounds i8, ptr %0, i64 196
  store i32 %11, ptr %22, align 4, !tbaa !35
  %23 = getelementptr inbounds i8, ptr %3, i64 20
  %24 = load i32, ptr %23, align 4, !tbaa !36
  %25 = icmp eq i32 %24, 0
  %26 = zext i1 %25 to i32
  %27 = getelementptr inbounds i8, ptr %0, i64 204
  store i32 %26, ptr %27, align 4, !tbaa !37
  %28 = getelementptr inbounds i8, ptr %3, i64 28
  %29 = load i32, ptr %28, align 4, !tbaa !38
  %.not = icmp ne i32 %29, 0
  %30 = zext i1 %.not to i8
  %31 = getelementptr inbounds i8, ptr %0, i64 1609
  store i8 %30, ptr %31, align 1, !tbaa !39
  %.not31 = icmp eq i32 %29, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %3, i64 32
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !40
  br i1 %.not31, label %._crit_edge, label %32

32:                                               ; preds = %13
  %33 = icmp slt i32 %.pre, 2
  br i1 %33, label %._crit_edge, label %34

34:                                               ; preds = %32
  %spec.select = call i32 @llvm.umin.i32(i32 %.pre, i32 4)
  br label %._crit_edge

._crit_edge:                                      ; preds = %13, %34, %32
  %.0 = phi i32 [ 2, %32 ], [ %spec.select, %34 ], [ 4, %13 ]
  %.inv = icmp slt i32 %.pre, 5
  %spec.select32 = select i1 %.inv, i32 %.0, i32 5
  %35 = getelementptr inbounds i8, ptr %0, i64 1668
  store i32 %spec.select32, ptr %35, align 4, !tbaa !41
  %36 = getelementptr inbounds i8, ptr %3, i64 36
  %37 = load i32, ptr %36, align 4, !tbaa !42
  %38 = getelementptr inbounds i8, ptr %0, i64 1636
  store i32 %37, ptr %38, align 4, !tbaa !43
  %39 = getelementptr inbounds i8, ptr %3, i64 40
  %40 = load i32, ptr %39, align 8, !tbaa !44
  %41 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 %40, ptr %41, align 8, !tbaa !45
  %42 = getelementptr inbounds i8, ptr %3, i64 44
  %43 = load i32, ptr %42, align 4, !tbaa !46
  %44 = icmp sgt i32 %43, 1
  %45 = zext i1 %44 to i32
  %46 = getelementptr inbounds i8, ptr %0, i64 216
  store i32 %45, ptr %46, align 8, !tbaa !47
  %47 = getelementptr inbounds i8, ptr %3, i64 56
  %48 = load i64, ptr %47, align 8, !tbaa !48
  %49 = getelementptr inbounds i8, ptr %0, i64 1072
  store i64 %48, ptr %49, align 8, !tbaa !49
  %50 = getelementptr inbounds i8, ptr %0, i64 360
  store i64 %48, ptr %50, align 8, !tbaa !50
  br label %51

51:                                               ; preds = %2, %._crit_edge
  %.128 = phi i32 [ 0, %._crit_edge ], [ 5, %2 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  ret i32 %.128
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #3

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 4, !6, i64 20, i64 4, !6, i64 24, i64 4, !6, i64 28, i64 4, !6, i64 32, i64 4, !6, i64 36, i64 4, !6, i64 40, i64 4, !6, i64 44, i64 4, !6, i64 48, i64 8, !10, i64 56, i64 8, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!13, !7, i64 8}
!13 = !{!"_CLzmaEncProps", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !11, i64 48, !11, i64 56}
!14 = !{!13, !7, i64 4}
!15 = !{!16, !7, i64 244}
!16 = !{!"", !17, i64 0, !18, i64 8, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !8, i64 80, !7, i64 96, !7, i64 100, !17, i64 104, !19, i64 112, !7, i64 184, !7, i64 188, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !11, i64 224, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !20, i64 256, !27, i64 1576, !8, i64 2736, !8, i64 2864, !8, i64 3376, !8, i64 5568, !8, i64 5632, !8, i64 6656, !8, i64 8704, !8, i64 8736, !8, i64 8760, !8, i64 8784, !8, i64 8808, !8, i64 8832, !8, i64 9216, !8, i64 9600, !8, i64 10112, !28, i64 10368, !28, i64 11392, !8, i64 12416, !29, i64 28800, !29, i64 46212, !8, i64 63624, !30, i64 129160, !8, i64 132904}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!"_IMatchFinder", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32}
!19 = !{!"", !7, i64 0, !7, i64 4, !11, i64 8, !11, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !11, i64 56, !7, i64 64}
!20 = !{!"_CMatchFinderMt", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !7, i64 32, !7, i64 36, !17, i64 40, !7, i64 48, !7, i64 52, !17, i64 56, !17, i64 64, !7, i64 72, !8, i64 76, !21, i64 80, !8, i64 592, !17, i64 720, !7, i64 728, !7, i64 732, !7, i64 736, !7, i64 740, !17, i64 744, !7, i64 752, !7, i64 756, !7, i64 760, !17, i64 768, !7, i64 776, !7, i64 780, !7, i64 784, !21, i64 792, !17, i64 1304, !17, i64 1312}
!21 = !{!"_CMtSync", !7, i64 0, !22, i64 8, !11, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !24, i64 56, !24, i64 160, !25, i64 264, !25, i64 368, !26, i64 472}
!22 = !{!"_CThread", !23, i64 0, !7, i64 8}
!23 = !{!"long", !8, i64 0}
!24 = !{!"_CEvent", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 16, !8, i64 56}
!25 = !{!"_CSemaphore", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 16, !8, i64 56}
!26 = !{!"_CCriticalSection", !8, i64 0}
!27 = !{!"_CMatchFinder", !17, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !8, i64 32, !8, i64 33, !8, i64 34, !8, i64 35, !7, i64 36, !17, i64 40, !17, i64 48, !7, i64 56, !7, i64 60, !17, i64 64, !17, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !23, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !8, i64 120, !23, i64 1144, !11, i64 1152}
!28 = !{!"", !8, i64 0, !8, i64 512}
!29 = !{!"", !7, i64 0, !8, i64 4}
!30 = !{!"", !17, i64 0, !7, i64 8, !8, i64 12, !8, i64 28, !8, i64 60, !8, i64 84, !8, i64 108, !8, i64 132, !8, i64 156, !8, i64 540, !8, i64 924, !8, i64 1436, !28, i64 1692, !28, i64 2716}
!31 = !{!13, !7, i64 24}
!32 = !{!16, !7, i64 72}
!33 = !{!16, !7, i64 188}
!34 = !{!16, !7, i64 192}
!35 = !{!16, !7, i64 196}
!36 = !{!13, !7, i64 20}
!37 = !{!16, !7, i64 204}
!38 = !{!13, !7, i64 28}
!39 = !{!16, !8, i64 1609}
!40 = !{!13, !7, i64 32}
!41 = !{!16, !7, i64 1668}
!42 = !{!13, !7, i64 36}
!43 = !{!16, !7, i64 1636}
!44 = !{!13, !7, i64 40}
!45 = !{!16, !7, i64 208}
!46 = !{!13, !7, i64 44}
!47 = !{!16, !7, i64 216}
!48 = !{!13, !11, i64 56}
!49 = !{!16, !11, i64 1072}
!50 = !{!16, !11, i64 360}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass