	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function target_xfer_memory_partial
_target_xfer_memory_partial:            ## @target_xfer_memory_partial
	.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
	xorl	%r14d, %r14d
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	callq	_lookup_mem_region
	movslq	%ebx, %rdx
	addq	%r13, %rdx
	movq	(%rax), %rsi
	movl	%esi, %ecx
	subl	%r13d, %ecx
	cmpq	%rsi, %rdx
	cmovll	%ebx, %ecx
	movl	8(%rax), %edx
	cmpl	$128, %edx
	je	LBB0_4
## %bb.3:
	cmpl	$129, %edx
	jne	LBB0_6
LBB0_4:
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$-1, %eax
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_13
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_6:
	cmpq	$0, 16(%rax)
	je	LBB0_8
## %bb.7:
	movq	_target_dcache@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movl	%r12d, %r8d
	callq	_dcache_xfer_memory
	jmp	LBB0_9
LBB0_8:
	addq	$8, %rax
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%ecx, %edx
	movl	%r12d, %ecx
	movq	%rax, %r8
	callq	_do_xfer_memory
LBB0_9:
	testl	%eax, %eax
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jg	LBB0_13
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	jne	LBB0_12
## %bb.11:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_12:
	movl	$-1, %eax
LBB0_13:
	movl	%r14d, (%r8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_target_dcache,4,2              ## @target_dcache
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_target_xfer_memory_partial
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function target_xfer_memory_partial
_target_xfer_memory_partial:            ; @target_xfer_memory_partial
	.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
	mov	x19, x4
	cbz	w2, LBB0_6
; %bb.1:
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
	bl	_lookup_mem_region
	add	x8, x22, w23, sxtw
	ldr	x9, [x0]
	sub	w10, w9, w22
	cmp	x8, x9
	csel	w3, w23, w10, lt
	mov	x4, x0
	ldr	w8, [x4, #8]!
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #129
	ccmp	w20, #0, #4, eq
	b.ne	LBB0_8
LBB0_3:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _target_dcache@GOTPAGE
Lloh1:
	ldr	x8, [x8, _target_dcache@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x22
	mov	x2, x21
	mov	x4, x20
	bl	_dcache_xfer_memory
	cmp	w0, #0
	b.le	LBB0_10
LBB0_5:
	mov	w8, #0
	b	LBB0_12
LBB0_6:
	mov	w8, #0
	mov	w0, #0
	b	LBB0_12
LBB0_7:
	cbz	w20, LBB0_3
LBB0_8:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	b	LBB0_11
LBB0_9:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x3
	mov	x3, x20
	bl	_do_xfer_memory
	cmp	w0, #0
	b.gt	LBB0_5
LBB0_10:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _EIO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, w8, eq
LBB0_11:
	mov	w0, #-1
LBB0_12:
	str	w8, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_target_dcache,4,2              ; @target_dcache
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_target_xfer_memory_partial
.subsections_via_symbols
