	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function optimize_cmf
_optimize_cmf:                          ## @optimize_cmf
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$16384, %esi                    ## imm = 0x4000
	jg	LBB0_8
## %bb.1:
	movl	(%rdi), %ecx
	movl	%ecx, %eax
	andl	$15, %eax
	cmpl	$8, %eax
	jne	LBB0_8
## %bb.2:
	movl	%ecx, %eax
	andl	$240, %eax
	cmpl	$112, %eax
	ja	LBB0_8
## %bb.3:
	shrl	$4, %ecx
	movl	$128, %edx
	shll	%cl, %edx
	cmpl	%esi, %edx
	jb	LBB0_8
## %bb.4:
	movl	%ecx, %r8d
	shll	$12, %r8d
	orl	$2048, %r8d                     ## imm = 0x800
	movl	%ecx, %eax
	shll	$4, %eax
	orl	$8, %eax
	decl	%ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	addl	$-4096, %r8d                    ## imm = 0xF000
	addl	$-16, %eax
	addl	$-1, %ecx
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	shrl	%edx
	cmpl	%esi, %edx
	jae	LBB0_5
LBB0_7:
	movl	%eax, (%rdi)
	movl	$224, %eax
	andl	4(%rdi), %eax
	orl	%eax, %r8d
	imulq	$138547333, %r8, %rcx           ## imm = 0x8421085
	shrq	$32, %rcx
	movl	%r8d, %edx
	subl	%ecx, %edx
	shrl	%edx
	addl	%ecx, %edx
	shrl	$4, %edx
	movl	%edx, %ecx
	shll	$5, %ecx
	subl	%ecx, %edx
	addl	%r8d, %edx
	orl	%eax, %edx
	xorl	$31, %edx
	movl	%edx, 4(%rdi)
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_optimize_cmf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function optimize_cmf
_optimize_cmf:                          ; @optimize_cmf
	.cfi_startproc
; %bb.0:
	cmp	w1, #4, lsl #12                 ; =16384
	b.gt	LBB0_3
; %bb.1:
	ldr	w8, [x0]
	and	w9, w8, #0xf
	cmp	w9, #8
	b.ne	LBB0_3
; %bb.2:
	and	w9, w8, #0xf0
	cmp	w9, #112
	lsr	w11, w8, #4
	mov	w8, #128
	lsl	w9, w8, w11
	ccmp	w9, w1, #0, ls
	b.hs	LBB0_4
LBB0_3:
	ret
LBB0_4:
	mov	w10, #2048
	bfi	w10, w11, #12, #20
	mov	w8, #8
	bfi	w8, w11, #4, #28
	sub	w11, w11, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	w10, w10, #1, lsl #12           ; =4096
	sub	w8, w8, #16
	subs	w11, w11, #1
	b.lo	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	lsr	w9, w9, #1
	cmp	w9, w1
	b.hs	LBB0_5
LBB0_7:
	ldr	w9, [x0, #4]
	and	w9, w9, #0xe0
	orr	w10, w9, w10
	mov	w11, #4229
	movk	w11, #2114, lsl #16
	umull	x11, w10, w11
	lsr	x11, x11, #32
	sub	w12, w10, w11
	add	w11, w11, w12, lsr #1
	lsr	w11, w11, #4
	sub	w11, w11, w11, lsl #5
	add	w10, w10, w11
	orr	w9, w10, w9
	eor	w9, w9, #0x1f
	stp	w8, w9, [x0]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_optimize_cmf
.subsections_via_symbols
