; LLVM IR from DanEngelbrecht/longtail :: lib/brotli/ext/dec (state)

; 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.BrotliDecoderStateStruct = type { i32, i32, %struct.BrotliBitReader, ptr, ptr, ptr, %union.anon, i64, i32, i32, i32, i32, i32, i32, [4 x i32], i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.HuffmanTreeGroup, %struct.HuffmanTreeGroup, %struct.HuffmanTreeGroup, ptr, ptr, i32, i32, [3 x i64], i64, [3 x i64], [6 x i64], i64, i64, i64, ptr, ptr, i64, i64, i64, [65 x i32], i32, i32, i8, ptr, ptr, ptr, i64, i32, i32, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, [8 x i32], %union.anon.0 }
%struct.BrotliBitReader = type { i64, i64, ptr, ptr, ptr }
%union.anon = type { i64 }
%struct.HuffmanTreeGroup = type { ptr, ptr, i16, i16, i16 }
%union.anon.0 = type { %struct.BrotliMetablockBodyArena }
%struct.BrotliMetablockBodyArena = type { [544 x i8], [544 x i64] }

; Function Attrs: nounwind uwtable
define hidden i32 @BrotliDecoderStateInit(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %19, label %12

12:                                               ; preds = %4
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %13, i32 0, i32 3
  store ptr @BrotliDefaultAllocFunc, ptr %14, align 8, !tbaa !9
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %15, i32 0, i32 4
  store ptr @BrotliDefaultFreeFunc, ptr %16, align 8, !tbaa !16
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %17, i32 0, i32 5
  store ptr null, ptr %18, align 8, !tbaa !17
  br label %29

19:                                               ; preds = %4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %21, i32 0, i32 3
  store ptr %20, ptr %22, align 8, !tbaa !9
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %24, i32 0, i32 4
  store ptr %23, ptr %25, align 8, !tbaa !16
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %27, i32 0, i32 5
  store ptr %26, ptr %28, align 8, !tbaa !17
  br label %29

29:                                               ; preds = %19, %12
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %30, i32 0, i32 15
  store i32 0, ptr %31, align 8, !tbaa !18
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %32, i32 0, i32 2
  call void @BrotliInitBitReader(ptr noundef %33)
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %34, i32 0, i32 0
  store i32 0, ptr %35, align 8, !tbaa !19
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %36, i32 0, i32 55
  %38 = load i32, ptr %37, align 4
  %39 = and i32 %38, -33
  %40 = or i32 %39, 0
  store i32 %40, ptr %37, align 4
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %41, i32 0, i32 50
  store i32 0, ptr %42, align 8, !tbaa !20
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %43, i32 0, i32 51
  store i32 0, ptr %44, align 4, !tbaa !21
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %45, i32 0, i32 52
  store i32 0, ptr %46, align 8, !tbaa !22
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %47, i32 0, i32 53
  store i32 0, ptr %48, align 4, !tbaa !23
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %49, i32 0, i32 7
  store i64 0, ptr %50, align 8, !tbaa !24
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %51, i32 0, i32 1
  store i32 0, ptr %52, align 4, !tbaa !25
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %53, i32 0, i32 8
  store i32 0, ptr %54, align 8, !tbaa !26
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %55, i32 0, i32 39
  store i64 0, ptr %56, align 8, !tbaa !27
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %57, i32 0, i32 40
  store i64 0, ptr %58, align 8, !tbaa !28
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %59, i32 0, i32 49
  store i64 0, ptr %60, align 8, !tbaa !29
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %61, i32 0, i32 26
  store ptr null, ptr %62, align 8, !tbaa !30
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %63, i32 0, i32 27
  store ptr null, ptr %64, align 8, !tbaa !31
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %65, i32 0, i32 17
  store ptr null, ptr %66, align 8, !tbaa !32
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %67, i32 0, i32 11
  store i32 0, ptr %68, align 4, !tbaa !33
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %69, i32 0, i32 54
  store i32 0, ptr %70, align 8, !tbaa !34
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %71, i32 0, i32 12
  store i32 0, ptr %72, align 8, !tbaa !35
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %73, i32 0, i32 57
  store ptr null, ptr %74, align 8, !tbaa !36
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %75, i32 0, i32 58
  store ptr null, ptr %76, align 8, !tbaa !37
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %77, i32 0, i32 37
  store ptr null, ptr %78, align 8, !tbaa !38
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %79, i32 0, i32 21
  store ptr null, ptr %80, align 8, !tbaa !39
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %81, i32 0, i32 22
  store ptr null, ptr %82, align 8, !tbaa !40
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %83, i32 0, i32 23
  %85 = getelementptr inbounds %struct.HuffmanTreeGroup, ptr %84, i32 0, i32 1
  store ptr null, ptr %85, align 8, !tbaa !41
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %86, i32 0, i32 23
  %88 = getelementptr inbounds %struct.HuffmanTreeGroup, ptr %87, i32 0, i32 0
  store ptr null, ptr %88, align 8, !tbaa !42
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %89, i32 0, i32 24
  %91 = getelementptr inbounds %struct.HuffmanTreeGroup, ptr %90, i32 0, i32 1
  store ptr null, ptr %91, align 8, !tbaa !43
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %92, i32 0, i32 24
  %94 = getelementptr inbounds %struct.HuffmanTreeGroup, ptr %93, i32 0, i32 0
  store ptr null, ptr %94, align 8, !tbaa !44
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %95, i32 0, i32 25
  %97 = getelementptr inbounds %struct.HuffmanTreeGroup, ptr %96, i32 0, i32 1
  store ptr null, ptr %97, align 8, !tbaa !45
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %98, i32 0, i32 25
  %100 = getelementptr inbounds %struct.HuffmanTreeGroup, ptr %99, i32 0, i32 0
  store ptr null, ptr %100, align 8, !tbaa !46
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %101, i32 0, i32 55
  %103 = load i32, ptr %102, align 4
  %104 = and i32 %103, -2
  %105 = or i32 %104, 0
  store i32 %105, ptr %102, align 4
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %106, i32 0, i32 55
  %108 = load i32, ptr %107, align 4
  %109 = and i32 %108, -3
  %110 = or i32 %109, 0
  store i32 %110, ptr %107, align 4
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %111, i32 0, i32 55
  %113 = load i32, ptr %112, align 4
  %114 = and i32 %113, -5
  %115 = or i32 %114, 0
  store i32 %115, ptr %112, align 4
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %116, i32 0, i32 55
  %118 = load i32, ptr %117, align 4
  %119 = and i32 %118, -9
  %120 = or i32 %119, 0
  store i32 %120, ptr %117, align 4
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %121, i32 0, i32 55
  %123 = load i32, ptr %122, align 4
  %124 = and i32 %123, -17
  %125 = or i32 %124, 16
  store i32 %125, ptr %122, align 4
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %126, i32 0, i32 55
  %128 = load i32, ptr %127, align 4
  %129 = and i32 %128, -4033
  %130 = or i32 %129, 0
  store i32 %130, ptr %127, align 4
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %131, i32 0, i32 10
  store i32 0, ptr %132, align 8, !tbaa !47
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %133, i32 0, i32 14
  %135 = getelementptr inbounds [4 x i32], ptr %134, i64 0, i64 0
  store i32 16, ptr %135, align 8, !tbaa !48
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %136, i32 0, i32 14
  %138 = getelementptr inbounds [4 x i32], ptr %137, i64 0, i64 1
  store i32 15, ptr %138, align 4, !tbaa !48
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %139, i32 0, i32 14
  %141 = getelementptr inbounds [4 x i32], ptr %140, i64 0, i64 2
  store i32 11, ptr %141, align 8, !tbaa !48
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %142, i32 0, i32 14
  %144 = getelementptr inbounds [4 x i32], ptr %143, i64 0, i64 3
  store i32 4, ptr %144, align 4, !tbaa !48
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %145, i32 0, i32 13
  store i32 0, ptr %146, align 4, !tbaa !49
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %147, i32 0, i32 26
  store ptr null, ptr %148, align 8, !tbaa !30
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %149, i32 0, i32 27
  store ptr null, ptr %150, align 8, !tbaa !31
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %151, i32 0, i32 41
  store i64 63, ptr %152, align 8, !tbaa !50
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %153, i32 0, i32 60
  store ptr null, ptr %154, align 8, !tbaa !51
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = call ptr @BrotliSharedDictionaryCreateInstance(ptr noundef %155, ptr noundef %156, ptr noundef %157)
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %159, i32 0, i32 59
  store ptr %158, ptr %160, align 8, !tbaa !52
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %161, i32 0, i32 59
  %163 = load ptr, ptr %162, align 8, !tbaa !52
  %164 = icmp ne ptr %163, null
  br i1 %164, label %166, label %165

165:                                              ; preds = %29
  store i32 0, ptr %5, align 4
  br label %173

166:                                              ; preds = %29
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %167, i32 0, i32 46
  store ptr null, ptr %168, align 8, !tbaa !53
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %169, i32 0, i32 47
  store ptr null, ptr %170, align 8, !tbaa !54
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.BrotliDecoderStateStruct, ptr %171, i32 0, i32 48
  store ptr null, ptr %172, align 8, !tbaa !55
  store i32 1, ptr %5, align 4
  br label %173

173:                                              ; preds = %166, %165
  %174 = load i32, ptr %5, align 4
  ret i32 %174
}

declare ptr @BrotliDefaultAllocFunc(ptr noundef, i64 noundef) #1

declare void @BrotliDefaultFreeFunc(ptr noundef, ptr noundef) #1

declare hidden void @BrotliInitBitReader(ptr noundef) #1

declare ptr @BrotliSharedDictionaryCreateInstance(ptr noundef, ptr noundef, ptr noundef) #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 = { "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 48}
!10 = !{!"BrotliDecoderStateStruct", !11, i64 0, !11, i64 4, !12, i64 8, !6, i64 48, !6, i64 56, !6, i64 64, !7, i64 72, !13, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !7, i64 112, !11, i64 128, !11, i64 132, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !14, i64 184, !14, i64 208, !14, i64 232, !6, i64 256, !6, i64 264, !11, i64 272, !11, i64 276, !7, i64 280, !13, i64 304, !7, i64 312, !7, i64 336, !13, i64 384, !13, i64 392, !13, i64 400, !6, i64 408, !6, i64 416, !13, i64 424, !13, i64 432, !13, i64 440, !7, i64 448, !11, i64 708, !11, i64 712, !7, i64 716, !6, i64 720, !6, i64 728, !6, i64 736, !13, i64 744, !11, i64 752, !11, i64 756, !11, i64 760, !11, i64 764, !11, i64 768, !11, i64 772, !11, i64 772, !11, i64 772, !11, i64 772, !11, i64 772, !11, i64 772, !11, i64 772, !11, i64 773, !13, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !7, i64 816, !7, i64 848}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!13 = !{!"long", !7, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 8, !15, i64 16, !15, i64 18, !15, i64 20}
!15 = !{!"short", !7, i64 0}
!16 = !{!10, !6, i64 56}
!17 = !{!10, !6, i64 64}
!18 = !{!10, !11, i64 128}
!19 = !{!10, !11, i64 0}
!20 = !{!10, !11, i64 752}
!21 = !{!10, !11, i64 756}
!22 = !{!10, !11, i64 760}
!23 = !{!10, !11, i64 764}
!24 = !{!10, !13, i64 80}
!25 = !{!10, !11, i64 4}
!26 = !{!10, !11, i64 88}
!27 = !{!10, !13, i64 424}
!28 = !{!10, !13, i64 432}
!29 = !{!10, !13, i64 744}
!30 = !{!10, !6, i64 256}
!31 = !{!10, !6, i64 264}
!32 = !{!10, !6, i64 136}
!33 = !{!10, !11, i64 100}
!34 = !{!10, !11, i64 768}
!35 = !{!10, !11, i64 104}
!36 = !{!10, !6, i64 784}
!37 = !{!10, !6, i64 792}
!38 = !{!10, !6, i64 408}
!39 = !{!10, !6, i64 168}
!40 = !{!10, !6, i64 176}
!41 = !{!10, !6, i64 192}
!42 = !{!10, !6, i64 184}
!43 = !{!10, !6, i64 216}
!44 = !{!10, !6, i64 208}
!45 = !{!10, !6, i64 240}
!46 = !{!10, !6, i64 232}
!47 = !{!10, !11, i64 96}
!48 = !{!11, !11, i64 0}
!49 = !{!10, !11, i64 108}
!50 = !{!10, !13, i64 440}
!51 = !{!10, !6, i64 808}
!52 = !{!10, !6, i64 800}
!53 = !{!10, !6, i64 720}
!54 = !{!10, !6, i64 728}
!55 = !{!10, !6, i64 736}


; 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: nounwind uwtable
define hidden range(i32 0, 2) i32 @BrotliDecoderStateInit(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %.not = icmp eq ptr %1, null
  %.sink68 = select i1 %.not, ptr @BrotliDefaultAllocFunc, ptr %1
  %.sink67 = select i1 %.not, ptr @BrotliDefaultFreeFunc, ptr %2
  %.sink = select i1 %.not, ptr null, ptr %3
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %.sink68, ptr %5, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %.sink67, ptr %6, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %.sink, ptr %7, align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 0, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @BrotliInitBitReader(ptr noundef nonnull %9) #3
  store i32 0, ptr %0, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %0, i64 772
  %11 = load i32, ptr %10, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  store i64 0, ptr %12, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 0, ptr %13, align 4, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 0, ptr %14, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %0, i64 424
  %16 = getelementptr inbounds i8, ptr %0, i64 744
  %17 = getelementptr inbounds i8, ptr %0, i64 256
  %18 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr null, ptr %18, align 8, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %0, i64 784
  %20 = getelementptr inbounds i8, ptr %0, i64 408
  store ptr null, ptr %20, align 8, !tbaa !20
  %21 = getelementptr inbounds i8, ptr %0, i64 168
  %22 = getelementptr inbounds i8, ptr %0, i64 208
  %23 = getelementptr inbounds i8, ptr %0, i64 232
  %24 = and i32 %11, -4096
  %25 = or disjoint i32 %24, 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %21, i8 0, i64 32, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %22, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %16, i8 0, i64 28, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 0, i64 16, i1 false)
  store i32 %25, ptr %10, align 4
  %26 = getelementptr inbounds i8, ptr %0, i64 96
  %27 = getelementptr inbounds i8, ptr %0, i64 112
  store <4 x i32> <i32 16, i32 15, i32 11, i32 4>, ptr %27, align 8, !tbaa !21
  store <4 x i32> zeroinitializer, ptr %26, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %0, i64 440
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false)
  store i64 63, ptr %28, align 8, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %0, i64 808
  store ptr null, ptr %29, align 8, !tbaa !23
  %30 = tail call ptr @BrotliSharedDictionaryCreateInstance(ptr noundef %1, ptr noundef %2, ptr noundef %3) #3
  %31 = getelementptr inbounds i8, ptr %0, i64 800
  store ptr %30, ptr %31, align 8, !tbaa !24
  %.not66 = icmp eq ptr %30, null
  br i1 %.not66, label %34, label %32

32:                                               ; preds = %4
  %33 = getelementptr inbounds i8, ptr %0, i64 720
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %33, i8 0, i64 24, i1 false)
  br label %34

34:                                               ; preds = %4, %32
  %.0 = phi i32 [ 1, %32 ], [ 0, %4 ]
  ret i32 %.0
}

declare ptr @BrotliDefaultAllocFunc(ptr noundef, i64 noundef) #1

declare void @BrotliDefaultFreeFunc(ptr noundef, ptr noundef) #1

declare hidden void @BrotliInitBitReader(ptr noundef) local_unnamed_addr #1

declare ptr @BrotliSharedDictionaryCreateInstance(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !7, i64 128}
!6 = !{!"BrotliDecoderStateStruct", !7, i64 0, !7, i64 4, !10, i64 8, !12, i64 48, !12, i64 56, !12, i64 64, !8, i64 72, !11, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !8, i64 112, !7, i64 128, !7, i64 132, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !13, i64 184, !13, i64 208, !13, i64 232, !12, i64 256, !12, i64 264, !7, i64 272, !7, i64 276, !8, i64 280, !11, i64 304, !8, i64 312, !8, i64 336, !11, i64 384, !11, i64 392, !11, i64 400, !12, i64 408, !12, i64 416, !11, i64 424, !11, i64 432, !11, i64 440, !8, i64 448, !7, i64 708, !7, i64 712, !8, i64 716, !12, i64 720, !12, i64 728, !12, i64 736, !11, i64 744, !7, i64 752, !7, i64 756, !7, i64 760, !7, i64 764, !7, i64 768, !7, i64 772, !7, i64 772, !7, i64 772, !7, i64 772, !7, i64 772, !7, i64 772, !7, i64 772, !7, i64 773, !11, i64 776, !12, i64 784, !12, i64 792, !12, i64 800, !12, i64 808, !8, i64 816, !8, i64 848}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 8, !14, i64 16, !14, i64 18, !14, i64 20}
!14 = !{!"short", !8, i64 0}
!15 = !{!6, !7, i64 0}
!16 = !{!6, !11, i64 80}
!17 = !{!6, !7, i64 4}
!18 = !{!6, !7, i64 88}
!19 = !{!6, !12, i64 136}
!20 = !{!6, !12, i64 408}
!21 = !{!7, !7, i64 0}
!22 = !{!6, !11, i64 440}
!23 = !{!6, !12, i64 808}
!24 = !{!6, !12, i64 800}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass