	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BrotliOptimizeHistograms       ## -- Begin function BrotliOptimizeHistograms
	.p2align	4, 0x90
_BrotliOptimizeHistograms:              ## @BrotliOptimizeHistograms
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BROTLI_NUM_COMMAND_SYMBOLS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.1:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movl	(%rax,%r12,4), %esi
	movl	$256, %edi                      ## imm = 0x100
	movq	%r14, %rdx
	callq	_BrotliOptimizeHuffmanCountsForRle
	incq	%r12
	cmpq	(%r15), %r12
	jb	LBB0_2
LBB0_3:
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rdi
	movq	32(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdx
	callq	_BrotliOptimizeHuffmanCountsForRle
	incq	%rbx
	cmpq	8(%r15), %rbx
	jb	LBB0_5
LBB0_6:
	movq	_BROTLI_MAX_DISTANCE_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %eax
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.7:
	movq	_BROTLI_NUM_DISTANCE_SHORT_CODES@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	(%rcx), %rdx
	movslq	%eax, %r12
	addq	%rdx, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_BrotliOptimizeHuffmanCountsForRle
	incq	%rbx
	cmpq	16(%r15), %rbx
	jb	LBB0_8
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BROTLI_NUM_COMMAND_SYMBOLS,4,2 ## @BROTLI_NUM_COMMAND_SYMBOLS
	.comm	_BROTLI_NUM_DISTANCE_SHORT_CODES,8,3 ## @BROTLI_NUM_DISTANCE_SHORT_CODES
	.comm	_BROTLI_MAX_DISTANCE_BITS,4,2   ## @BROTLI_MAX_DISTANCE_BITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BrotliOptimizeHistograms       ; -- Begin function BrotliOptimizeHistograms
	.p2align	2
_BrotliOptimizeHistograms:              ; @BrotliOptimizeHistograms
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _BROTLI_NUM_COMMAND_SYMBOLS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BROTLI_NUM_COMMAND_SYMBOLS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x2]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	w1, [x8, x24, lsl #2]
	mov	w0, #256
	mov	x2, x20
	bl	_BrotliOptimizeHuffmanCountsForRle
	add	x24, x24, #1
	ldr	x8, [x19]
	cmp	x24, x8
	b.lo	LBB0_2
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x0, [x23]
	ldr	x8, [x19, #32]
	ldr	w1, [x8, x24, lsl #2]
	mov	x2, x20
	bl	_BrotliOptimizeHuffmanCountsForRle
	add	x24, x24, #1
	ldr	x8, [x19, #8]
	cmp	x24, x8
	b.lo	LBB0_5
LBB0_6:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.7:
	mov	x23, #0
Lloh7:
	adrp	x8, _BROTLI_NUM_DISTANCE_SHORT_CODES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BROTLI_NUM_DISTANCE_SHORT_CODES@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x8, x8, x22
Lloh10:
	adrp	x9, _BROTLI_MAX_DISTANCE_BITS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BROTLI_MAX_DISTANCE_BITS@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w9, w9, #1
	lsl	w9, w9, w21
	add	x21, x8, w9, sxtw
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x21
	mov	x2, x20
	bl	_BrotliOptimizeHuffmanCountsForRle
	add	x23, x23, #1
	ldr	x8, [x19, #16]
	cmp	x23, x8
	b.lo	LBB0_8
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BROTLI_NUM_COMMAND_SYMBOLS,4,2 ; @BROTLI_NUM_COMMAND_SYMBOLS
	.comm	_BROTLI_NUM_DISTANCE_SHORT_CODES,8,3 ; @BROTLI_NUM_DISTANCE_SHORT_CODES
	.comm	_BROTLI_MAX_DISTANCE_BITS,4,2   ; @BROTLI_MAX_DISTANCE_BITS
.subsections_via_symbols
