	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BrotliBuildHistogramsWithContext ## -- Begin function BrotliBuildHistogramsWithContext
	.p2align	4, 0x90
_BrotliBuildHistogramsWithContext:      ## @BrotliBuildHistogramsWithContext
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	-104(%rbp), %rdi
	movq	%rdx, %rsi
	callq	_InitBlockSplitIterator
	leaq	-96(%rbp), %rdi
	movq	%r15, %rsi
	callq	_InitBlockSplitIterator
	leaq	-88(%rbp), %rdi
	movq	%r14, %rsi
	callq	_InitBlockSplitIterator
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	movl	40(%rbp), %ebx
	movl	32(%rbp), %r13d
	movq	16(%rbp), %r12
	xorl	%esi, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	cmpq	-112(%rbp), %rsi                ## 8-byte Folded Reload
	je	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movl	%ebx, %r14d
	leaq	(%rsi,%rsi,2), %rbx
	leaq	-96(%rbp), %rdi
	callq	_BlockSplitIteratorNext
	movq	-96(%rbp), %rax
	movq	64(%rbp), %rcx
	leaq	(%rcx,%rax,4), %rdi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15,%rbx,8), %esi
	callq	_HistogramAddCommand
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r15,%rbx,8), %r15
	testq	%r15, %r15
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %ebx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r15
	movq	%r15, %rdi
	callq	_CommandCopyLen
	movq	%rax, %r12
	addq	%r14, %r12
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_CommandCopyLen
	testq	%rax, %rax
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-2(%r12), %rax
	movq	24(%rbp), %rdx
	andq	%rdx, %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %ebx
	leaq	-1(%r12), %rax
	andq	%rdx, %rax
	movl	(%rcx,%rax,4), %r13d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$128, (%rax)
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-88(%rbp), %rdi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	callq	_BlockSplitIteratorNext
	movq	-88(%rbp), %rbx
	movq	_BROTLI_DISTANCE_CONTEXT_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_CommandDistanceContext
	addq	%rbx, %rax
	movq	72(%rbp), %rcx
	leaq	(%rcx,%rax,4), %rdi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	16(%rcx,%rax,8), %esi
	callq	_HistogramAddDistance
	movq	%r14, %rsi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%r13d, %r14d
	movq	56(%rbp), %rax
	leaq	(%rax,%rbx,4), %rdi
	movq	%r12, %rbx
	andq	24(%rbp), %rbx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13,%rbx,4), %esi
	callq	_HistogramAddLiteral
	movl	(%r13,%rbx,4), %r13d
	incq	%r12
	movl	%r14d, %ebx
	decq	%r15
	je	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	-104(%rbp), %rdi
	callq	_BlockSplitIteratorNext
	movq	-104(%rbp), %rbx
	movq	48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_BROTLI_LITERAL_CONTEXT_BITS@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movl	(%rax,%rbx,4), %edx
	shlq	%cl, %rbx
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_Context
	addq	%rax, %rbx
	jmp	LBB0_6
LBB0_11:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BROTLI_LITERAL_CONTEXT_BITS,8,3 ## @BROTLI_LITERAL_CONTEXT_BITS
	.comm	_BROTLI_DISTANCE_CONTEXT_BITS,8,3 ## @BROTLI_DISTANCE_CONTEXT_BITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BrotliBuildHistogramsWithContext ; -- Begin function BrotliBuildHistogramsWithContext
	.p2align	2
_BrotliBuildHistogramsWithContext:      ; @BrotliBuildHistogramsWithContext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x20, x6
	mov	x21, x5
	mov	x24, x4
	mov	x25, x3
	mov	x22, x1
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	add	x0, sp, #56
	mov	x1, x2
	bl	_InitBlockSplitIterator
	add	x0, sp, #48
	mov	x1, x25
	bl	_InitBlockSplitIterator
	add	x0, sp, #40
	mov	x1, x24
	bl	_InitBlockSplitIterator
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
	cbz	x22, LBB0_11
; %bb.1:
	mov	x27, #0
	ldr	x8, [x29, #48]
	str	x8, [sp]                        ; 8-byte Folded Spill
	ldr	x8, [x29, #40]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldp	x28, x22, [x29, #24]
	ldp	w23, w24, [x29, #16]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x27, x8
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x27, [sp, #32]                  ; 8-byte Folded Spill
	mov	w9, #24
	madd	x25, x27, x9, x8
	add	x0, sp, #48
	bl	_BlockSplitIteratorNext
	ldr	x8, [sp, #48]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x0, x9, x8, lsl #2
	ldr	w1, [x25]
	bl	_HistogramAddCommand
	ldr	x27, [x25, #8]
	cbnz	x27, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x24
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	bl	_CommandCopyLen
	add	x20, x0, x20
	mov	x0, x25
	bl	_CommandCopyLen
	mov	x24, x26
	ldr	x27, [sp, #32]                  ; 8-byte Folded Reload
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x8, x20, #2
	and	x8, x8, x19
	ldr	w24, [x21, x8, lsl #2]
	sub	x8, x20, #1
	and	x8, x8, x19
	ldr	w23, [x21, x8, lsl #2]
	ldr	w8, [x25]
	cmp	w8, #128
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #40
	bl	_BlockSplitIteratorNext
	ldr	x8, [sp, #40]
Lloh0:
	adrp	x9, _BROTLI_DISTANCE_CONTEXT_BITS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BROTLI_DISTANCE_CONTEXT_BITS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	lsl	x26, x8, x9
	mov	x0, x25
	bl	_CommandDistanceContext
	add	x8, x26, x0
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x0, x9, x8, lsl #2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	mov	w9, #24
	madd	x8, x27, x9, x8
	ldr	w1, [x8, #16]
	bl	_HistogramAddDistance
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x0, x22, x8, lsl #2
	and	x8, x20, x19
	lsl	x23, x8, #2
	ldr	w1, [x21, x23]
	bl	_HistogramAddLiteral
	ldr	w23, [x21, x23]
	add	x20, x20, #1
	mov	x24, x26
	subs	x27, x27, #1
	b.eq	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x26, x23
	add	x0, sp, #56
	bl	_BlockSplitIteratorNext
	ldr	x8, [sp, #56]
	cbz	x28, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
Lloh3:
	adrp	x9, _BROTLI_LITERAL_CONTEXT_BITS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BROTLI_LITERAL_CONTEXT_BITS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	lsl	x23, x8, x9
	ldr	w2, [x28, x8, lsl #2]
	mov	x0, x26
	mov	x1, x24
	bl	_Context
	add	x8, x0, x23
	b	LBB0_8
LBB0_11:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BROTLI_LITERAL_CONTEXT_BITS,8,3 ; @BROTLI_LITERAL_CONTEXT_BITS
	.comm	_BROTLI_DISTANCE_CONTEXT_BITS,8,3 ; @BROTLI_DISTANCE_CONTEXT_BITS
.subsections_via_symbols
