	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdswap_discard
_mtdswap_discard:                       ## @mtdswap_discard
	.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	%edx, %r15d
	movq	%rsi, %rbx
	callq	_MTDSWAP_MBD_TO_MTDSWAP
	movq	%rax, %r14
	incl	32(%rax)
	movl	%r15d, %r12d
	leaq	(%r12,%rbx), %rax
	cmpq	%rbx, %rax
	jbe	LBB0_8
## %bb.1:
	movq	(%r14), %rax
	movq	_BLOCK_MAX@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r14), %rcx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	8(%r14)
                                        ## kill: def $eax killed $eax def $rax
	leaq	(%rcx,%rax,4), %rsi
	decl	(%rcx,%rax,4)
	movq	%r14, %rdi
	callq	_mtdswap_store_eb
	movq	_BLOCK_UNDEF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	(%r14), %rax
	movl	%ecx, (%rax,%rbx,4)
	movq	_PAGE_UNDEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movl	%ecx, (%rdx,%r15,4)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	12(%r14)
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	decq	%r12
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rbx,4), %r15d
	cmpl	(%r13), %r15d
	jbe	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BLOCK_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BLOCK_UNDEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax,%rbx,4)
	jmp	LBB0_6
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLOCK_MAX,4,2                  ## @BLOCK_MAX
	.comm	_BLOCK_UNDEF,8,3                ## @BLOCK_UNDEF
	.comm	_PAGE_UNDEF,4,2                 ## @PAGE_UNDEF
	.comm	_BLOCK_ERROR,4,2                ## @BLOCK_ERROR
	.no_dead_strip	_mtdswap_discard
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdswap_discard
_mtdswap_discard:                       ; @mtdswap_discard
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	bl	_MTDSWAP_MBD_TO_MTDSWAP
	ldr	w8, [x0, #32]
	add	w8, w8, #1
	str	w8, [x0, #32]
	mov	w21, w21
	add	x8, x21, x20
	cmp	x8, x20
	b.ls	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	lsl	x20, x20, #2
Lloh0:
	adrp	x22, _BLOCK_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BLOCK_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x23, _BLOCK_ERROR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BLOCK_ERROR@GOTPAGEOFF]
Lloh4:
	adrp	x24, _BLOCK_UNDEF@GOTPAGE
Lloh5:
	ldr	x24, [x24, _BLOCK_UNDEF@GOTPAGEOFF]
Lloh6:
	adrp	x25, _PAGE_UNDEF@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PAGE_UNDEF@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #24]
	ldr	w9, [x19, #8]
	udiv	w9, w26, w9
	add	x1, x8, w9, uxtw #2
	ldr	w8, [x1]
	sub	w8, w8, #1
	str	w8, [x1]
	mov	x0, x19
	bl	_mtdswap_store_eb
	ldr	x9, [x24]
	ldr	x8, [x19]
	str	w9, [x8, x20]
	ldr	w9, [x25]
	ldr	x10, [x19, #16]
	str	w9, [x10, x26, lsl #2]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x19, #12]
	add	w9, w9, #1
	str	w9, [x19, #12]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #4
	subs	x21, x21, #1
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w26, [x8, x20]
	ldr	w9, [x22]
	cmp	w26, w9
	b.ls	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x23]
	cmp	w26, w9
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x24]
	str	w9, [x8, x20]
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BLOCK_MAX,4,2                  ; @BLOCK_MAX
	.comm	_BLOCK_UNDEF,8,3                ; @BLOCK_UNDEF
	.comm	_PAGE_UNDEF,4,2                 ; @PAGE_UNDEF
	.comm	_BLOCK_ERROR,4,2                ; @BLOCK_ERROR
	.no_dead_strip	_mtdswap_discard
.subsections_via_symbols
