	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffs_mapsearch
_ffs_mapsearch:                         ## @ffs_mapsearch
	.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
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_UFS_FSNEEDSWAP
	movl	%eax, %r15d
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_dtogd
	jmp	LBB0_3
LBB0_2:
	movl	(%r14), %edi
	movl	%r15d, %esi
	callq	_ufs_rw32
LBB0_3:
	movq	_NBBY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cltd
	idivl	%esi
	movl	%eax, %r13d
	movl	8(%r12), %edi
	callq	_howmany
	movl	%eax, %ebx
	subl	%r13d, %ebx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %esi
	callq	_cg_blksfree_swap
	movslq	%r13d, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rcx,4), %rsi
	movq	_fragtbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%r12), %rax
	movq	(%rcx,%rax,8), %r8
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	-1(%rcx), %r15d
	movq	_NBBY@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rcx
	jmp	LBB0_6
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ecx
LBB0_6:
	addl	%r15d, %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %eax
	movl	%ebx, %edi
	movq	%r8, %rdx
	movl	%eax, %ecx
	callq	_scanc
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_8:
	incl	%r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_cg_blksfree_swap
	movq	%rax, %rsi
	movq	_fragtbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%r12), %rax
	movq	(%rcx,%rax,8), %r8
	movq	_NBBY@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_9
## %bb.10:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_11
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_11:
	addl	%edx, %r15d
	movl	$1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	%r13d, %edi
	movq	%r8, %rdx
	movl	%eax, %ecx
	callq	_scanc
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r14d
	movl	%r13d, %ebx
	xorl	%r13d, %r13d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_13:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r15), %edi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_ufs_rw32
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_cg_blksfree_swap
	subq	%r15, %rax
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	$1, %edi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_errx
	movl	%r13d, %ebx
	xorl	%r13d, %r13d
LBB0_14:
	subl	%r14d, %ebx
	addl	%r13d, %ebx
	movq	_NBBY@GOTPCREL(%rip), %r14
	imull	(%r14), %ebx
	movl	%ebx, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ufs_rw32
	movl	%eax, (%r15)
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.15:
	addl	%ebx, %eax
	movslq	-56(%rbp), %r13                 ## 4-byte Folded Reload
	leaq	-1(%r13), %r9
	movq	_around@GOTPCREL(%rip), %r10
	movq	_inside@GOTPCREL(%rip), %r15
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r10, %r14
	callq	_cg_blksfree_swap
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_blkmap
	movq	%r14, %r10
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	addl	%eax, %eax
	movq	(%r14), %rcx
	movl	(%rcx,%r13,4), %ebx
	movq	(%r15), %rcx
	movl	(%rcx,%r13,4), %esi
	movq	(%r12), %r8
	movq	%r9, %rcx
	subq	%r8, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edx
	andl	%eax, %edx
	cmpl	%esi, %edx
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=2
	addl	%ebx, %ebx
	addl	%esi, %esi
	decq	%rdi
	cmpq	%rdi, %rcx
	jne	LBB0_17
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	addl	%r8d, %ebx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %ebx
	jl	LBB0_16
LBB0_21:
	movslq	%ebx, %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	movl	$-1, %eax
	jmp	LBB0_22
LBB0_18:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	subl	%edi, %eax
LBB0_22:
	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
	.comm	_fragtbl,8,3                    ## @fragtbl
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ffs_alloccg: map corrupted: start %d len %d offset %d %ld"

	.comm	_around,8,3                     ## @around
	.comm	_inside,8,3                     ## @inside
L_.str.1:                               ## @.str.1
	.asciz	"ffs_alloccg: block not in map: bno %lld"

	.no_dead_strip	_ffs_mapsearch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffs_mapsearch
_ffs_mapsearch:                         ; @ffs_mapsearch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	bl	_UFS_FSNEEDSWAP
	mov	x21, x0
Lloh0:
	adrp	x27, _NBBY@GOTPAGE
Lloh1:
	ldr	x27, [x27, _NBBY@GOTPAGEOFF]
	cbz	x23, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x23
	bl	_dtogd
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_ufs_rw32
LBB0_3:
	ldr	w1, [x27]
	sdiv	w25, w0, w1
	ldr	w0, [x20, #8]
	bl	_howmany
	sub	w23, w0, w25
	mov	x0, x19
	mov	x1, x21
	bl	_cg_blksfree_swap
Lloh2:
	adrp	x28, _fragtbl@GOTPAGE
Lloh3:
	ldr	x28, [x28, _fragtbl@GOTPAGEOFF]
	add	x1, x0, w25, sxtw #2
	ldr	x8, [x28]
	ldr	x9, [x20]
	ldr	x2, [x8, x9, lsl #3]
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	sub	w26, w22, #1
	ldrsw	x8, [x27]
	udiv	x10, x9, x8
	msub	w8, w10, w8, w9
	add	w8, w26, w8
	mov	w22, #1
	lsl	w3, w22, w8
	mov	x0, x23
	bl	_scanc
	cbz	w0, LBB0_5
; %bb.4:
	mov	x24, x23
	b	LBB0_8
LBB0_5:
	add	w24, w25, #1
	mov	x0, x19
	mov	x1, x21
	bl	_cg_blksfree_swap
	mov	x1, x0
	ldr	x8, [x28]
	ldr	x9, [x20]
	ldr	x2, [x8, x9, lsl #3]
	ldrsw	x8, [x27]
	udiv	x10, x9, x8
	msub	w8, w10, w8, w9
	add	w8, w26, w8
	lsl	w3, w22, w8
	mov	x0, x24
	bl	_scanc
	cbnz	w0, LBB0_7
; %bb.6:
	sxtw	x25, w25
	ldr	w0, [x19, #4]
	mov	x1, x21
	bl	_ufs_rw32
	mov	x26, x0
	mov	x0, x19
	mov	x1, x21
	bl	_cg_blksfree_swap
	sub	x8, x0, x19
	stp	x26, x8, [sp, #8]
	str	x23, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x25
	bl	_errx
	mov	w0, #0
LBB0_7:
	mov	w25, #0
LBB0_8:
	sub	w8, w24, w0
	add	w8, w8, w25
	ldr	w9, [x27]
	mul	w23, w8, w9
	mov	x0, x23
	mov	x1, x21
	bl	_ufs_rw32
	str	w0, [x19]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.9:
	add	w24, w8, w23
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	sxtw	x8, w8
	mov	w9, #1
	sub	x22, x9, x8
Lloh6:
	adrp	x25, _around@GOTPAGE
Lloh7:
	ldr	x25, [x25, _around@GOTPAGEOFF]
	lsl	x26, x8, #2
Lloh8:
	adrp	x27, _inside@GOTPAGE
Lloh9:
	ldr	x27, [x27, _inside@GOTPAGEOFF]
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x19
	mov	x1, x21
	bl	_cg_blksfree_swap
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_blkmap
	lsl	w8, w0, #1
	ldr	x9, [x25]
	ldr	w9, [x9, x26]
	ldr	x10, [x27]
	ldr	w11, [x10, x26]
	ldr	x10, [x20]
	add	x12, x22, x10
	mov	x0, x23
LBB0_11:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w13, w9, w8
	cmp	w13, w11
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	lsl	w9, w9, #1
	lsl	w11, w11, #1
	add	w0, w0, #1
	subs	x12, x12, #1
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w23, w23, w10
	cmp	w23, w24
	b.lt	LBB0_10
LBB0_14:
	sxtw	x2, w23
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
	mov	w0, #-1
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NBBY,4,2                       ; @NBBY
	.comm	_fragtbl,8,3                    ; @fragtbl
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ffs_alloccg: map corrupted: start %d len %d offset %d %ld"

	.comm	_around,8,3                     ; @around
	.comm	_inside,8,3                     ; @inside
l_.str.1:                               ; @.str.1
	.asciz	"ffs_alloccg: block not in map: bno %lld"

	.no_dead_strip	_ffs_mapsearch
.subsections_via_symbols
