	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdswap_gc_eblock
_mtdswap_gc_eblock:                     ## @mtdswap_gc_eblock
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	subq	24(%rdi), %rsi
	shrq	$2, %rsi
	imull	%eax, %esi
	movl	%esi, %r14d
	xorl	%ebx, %ebx
	movq	_MIN_SPARE_EBLOCKS@GOTPCREL(%rip), %r12
	movq	_PAGE_UNDEF@GOTPCREL(%rip), %r11
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	cmpq	(%r12), %rcx
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%rbx), %rsi
	movq	16(%r13), %rcx
	movl	%esi, %edx
	movq	(%rcx,%rdx,8), %rcx
	cmpq	(%r11), %rcx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	leaq	-44(%rbp), %rdx
	callq	_mtdswap_move_block
	movq	_PAGE_UNDEF@GOTPCREL(%rip), %r11
	testl	%r15d, %r15d
	movl	%eax, %ecx
	cmovnel	%r15d, %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %r15d
	movl	(%r13), %eax
	jmp	LBB0_7
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_4:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIN_SPARE_EBLOCKS,8,3          ## @MIN_SPARE_EBLOCKS
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_PAGE_UNDEF,8,3                 ## @PAGE_UNDEF
	.no_dead_strip	_mtdswap_gc_eblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdswap_gc_eblock
_mtdswap_gc_eblock:                     ; @mtdswap_gc_eblock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x0
	mov	x21, #0
	mov	w19, #0
	ldr	x9, [x0, #24]
	sub	x9, x1, x9
	lsr	x9, x9, #2
	mul	w22, w8, w9
Lloh0:
	adrp	x23, _MIN_SPARE_EBLOCKS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MIN_SPARE_EBLOCKS@GOTPAGEOFF]
Lloh2:
	adrp	x24, _PAGE_UNDEF@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PAGE_UNDEF@GOTPAGEOFF]
	mov	w25, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.lt	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x22, x21
	ldr	x9, [x20, #16]
	ldr	x9, [x9, w1, uxtw #3]
	ldr	x10, [x24]
	cmp	x9, x10
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #12
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_mtdswap_move_block
	cmp	w19, #0
	ccmp	w0, w25, #0, eq
	csel	w19, w19, w0, gt
	ldr	w8, [x20]
	b	LBB0_2
LBB0_6:
	mov	w19, #0
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MIN_SPARE_EBLOCKS,8,3          ; @MIN_SPARE_EBLOCKS
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_PAGE_UNDEF,8,3                 ; @PAGE_UNDEF
	.no_dead_strip	_mtdswap_gc_eblock
.subsections_via_symbols
