	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ffs_clusteracct                ## -- Begin function ffs_clusteracct
	.p2align	4, 0x90
_ffs_clusteracct:                       ## @ffs_clusteracct
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_29
## %bb.1:
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_cg_clustersfree
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_cg_clustersum
	movq	%rax, %r13
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, %esi
	jle	LBB0_3
## %bb.2:
	callq	_setbit
	jmp	LBB0_4
LBB0_3:
	callq	_clrbit
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	1(%r14), %ebx
	movl	(%rax), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addl	%r14d, %eax
	incl	%eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %r11d
	cmpl	%r11d, %eax
	cmovll	%eax, %r11d
	movq	_NBBY@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movl	%ebx, %eax
	cltd
	idivl	%r10d
	movl	%edx, %ecx
	movl	$1, %r9d
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movl	%ebx, %edi
	cmpl	%r11d, %ebx
	jge	LBB0_12
## %bb.5:
	movslq	%eax, %rcx
	movl	(%r12,%rcx,4), %eax
	movl	%esi, %edx
	movl	%ebx, %edi
	andl	%eax, %edx
	je	LBB0_12
## %bb.6:
	leaq	(%r12,%rcx,4), %rcx
	addq	$4, %rcx
	leal	-1(%r10), %r8d
	movl	%ebx, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edi, %r15d
	notl	%r15d
	testl	%r15d, %r8d
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rcx), %eax
	addq	$4, %rcx
	movl	$1, %esi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	addl	%esi, %esi
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%edi
	cmpl	%r11d, %edi
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%esi, %edx
	andl	%eax, %edx
	jne	LBB0_7
LBB0_12:
	subl	%ebx, %edi
	decl	%r14d
	movl	%r14d, %eax
	movq	-72(%rbp), %r11                 ## 8-byte Reload
	subl	%r11d, %eax
	movl	$-1, %esi
	cmovnsl	%eax, %esi
	movl	%r14d, %eax
	cltd
	idivl	%r10d
	movl	%edx, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r9d
	movl	%r14d, %ecx
	cmpl	%esi, %r14d
	jle	LBB0_20
## %bb.13:
	movslq	%eax, %r8
	movl	(%r12,%r8,4), %eax
	movl	%r9d, %edx
	movl	%r14d, %ecx
	andl	%eax, %edx
	je	LBB0_20
## %bb.14:
	leaq	(%r12,%r8,4), %rdx
	addq	$-4, %rdx
	decl	%r10d
	movl	$1, %r8d
	movl	%r10d, %ecx
	shll	%cl, %r8d
	movl	%r14d, %ecx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	testl	%r10d, %ecx
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	sarl	%r9d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	(%rdx), %eax
	addq	$-4, %rdx
	movl	%r8d, %r9d
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	decl	%ecx
	cmpl	%esi, %ecx
	jle	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%r9d, %ebx
	andl	%eax, %ebx
	jne	LBB0_15
LBB0_20:
	subl	%ecx, %r14d
	leal	(%r14,%rdi), %eax
	leal	(%r14,%rdi), %ecx
	incl	%ecx
	cmpl	%r11d, %eax
	cmovgel	%r11d, %ecx
	movslq	%ecx, %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	%ecx, (%r13,%rax,4)
	testl	%r14d, %r14d
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_22
## %bb.21:
	movl	%r14d, %eax
	subl	%ecx, (%r13,%rax,4)
LBB0_22:
	testl	%edi, %edi
	jle	LBB0_24
## %bb.23:
	movl	%edi, %eax
	subl	%ecx, (%r13,%rax,4)
LBB0_24:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_28
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r13,%rax,4)
	jg	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	decq	%rax
	leal	1(%rax), %ecx
	cmpl	$1, %ecx
	jg	LBB0_25
## %bb.27:
	xorl	%eax, %eax
LBB0_28:
	movq	8(%rsi), %rcx
	movq	8(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
LBB0_29:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NBBY,4,2                       ## @NBBY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ffs_clusteracct                ; -- Begin function ffs_clusteracct
	.p2align	2
_ffs_clusteracct:                       ; @ffs_clusteracct
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_31
; %bb.1:
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_cg_clustersfree
	mov	x24, x0
	mov	x0, x19
	bl	_cg_clustersum
	mov	x21, x0
	mov	x0, x24
	mov	x1, x23
	cmp	w22, #1
	b.lt	LBB0_3
; %bb.2:
	bl	_setbit
	b	LBB0_4
LBB0_3:
	bl	_clrbit
LBB0_4:
	add	w9, w23, #1
	ldr	w8, [x20]
	ldr	w10, [x19]
	add	w11, w8, w9
	cmp	w11, w10
	csel	w12, w11, w10, lt
Lloh0:
	adrp	x10, _NBBY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NBBY@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	mov	w11, #1
	cmp	w9, w12
	b.ge	LBB0_12
; %bb.5:
	sdiv	w15, w9, w10
	add	x14, x24, w15, sxtw #2
	ldr	w13, [x14]
	msub	w15, w15, w10, w9
	lsl	w15, w11, w15
	and	w16, w15, w13
	cbz	w16, LBB0_12
; %bb.6:
	add	x16, x14, #4
	sub	w17, w10, #1
	mov	x14, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bics	wzr, w17, w14
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w13, [x16], #4
	mov	w15, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	lsl	w15, w15, #1
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w14, w14, #1
	cmp	w14, w12
	b.ge	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	and	w0, w15, w13
	cbnz	w0, LBB0_7
	b	LBB0_13
LBB0_12:
	mov	x14, x9
LBB0_13:
	sub	w9, w14, w9
	sub	w12, w23, #1
	sub	w13, w12, w8
	cmp	w13, #0
	csinv	w13, w13, wzr, ge
	cmp	w12, w13
	b.le	LBB0_21
; %bb.14:
	sdiv	w15, w12, w10
	add	x16, x24, w15, sxtw #2
	ldr	w14, [x16]
	msub	w15, w15, w10, w12
	lsl	w15, w11, w15
	and	w11, w15, w14
	cbz	w11, LBB0_21
; %bb.15:
	sub	x11, x16, #4
	sub	w16, w10, #1
	mov	w10, #1
	lsl	w17, w10, w16
	mov	x10, x12
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	tst	w10, w16
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	asr	w15, w15, #1
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w14, [x11], #-4
	mov	x15, x17
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	sub	w10, w10, #1
	cmp	w10, w13
	b.le	LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	and	w0, w15, w14
	cbnz	w0, LBB0_16
	b	LBB0_22
LBB0_21:
	mov	x10, x12
LBB0_22:
	sub	w10, w12, w10
	add	w11, w10, w9
	cmp	w11, w8
	csinc	w8, w8, w11, ge
	sbfiz	x8, x8, #2, #32
	ldr	w11, [x21, x8]
	add	w11, w11, w22
	str	w11, [x21, x8]
	cmp	w10, #1
	b.lt	LBB0_24
; %bb.23:
	lsl	x8, x10, #2
	ldr	w10, [x21, x8]
	sub	w10, w10, w22
	str	w10, [x21, x8]
LBB0_24:
	cmp	w9, #1
	b.lt	LBB0_26
; %bb.25:
	lsl	x8, x9, #2
	ldr	w9, [x21, x8]
	sub	w9, w9, w22
	str	w9, [x21, x8]
LBB0_26:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_30
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x21, x8, lsl #2]
	cmp	w9, #1
	b.ge	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	sub	x8, x8, #1
	add	w9, w8, #1
	cmp	w9, #1
	b.gt	LBB0_27
; %bb.29:
	mov	w8, #0
LBB0_30:
	ldr	x9, [x20, #8]
	ldr	x10, [x19, #8]
	str	w8, [x9, x10, lsl #2]
LBB0_31:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NBBY,4,2                       ; @NBBY
.subsections_via_symbols
