	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function block2mtd_write
_block2mtd_write:                       ## @block2mtd_write
	.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
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	%rax, %rbx
	subq	%rsi, %rbx
	jbe	LBB0_3
## %bb.4:
	movq	%r8, %r15
	movq	%rcx, %r14
	movq	8(%rdi), %r13
	leaq	(%rdx,%r12), %rcx
	cmpq	%rax, %rcx
	cmovbeq	%rdx, %rbx
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	movq	%r14, %r8
	callq	__block2mtd_write
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_block2mtd_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function block2mtd_write
_block2mtd_write:                       ; @block2mtd_write
	.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
	cbz	x2, LBB0_3
; %bb.1:
	mov	x21, x1
	ldr	x8, [x0]
	subs	x9, x8, x1
	b.ls	LBB0_4
; %bb.2:
	mov	x20, x4
	mov	x19, x3
	ldr	x22, [x0, #8]
	add	x10, x2, x21
	cmp	x10, x8
	csel	x23, x9, x2, hi
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	mov	x4, x19
	bl	__block2mtd_write
	mov	x19, x0
	mov	x0, x22
	bl	_mutex_unlock
	cmp	w19, #0
	csel	w0, w19, wzr, lt
	b	LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_block2mtd_write
.subsections_via_symbols
