	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function target_xfer_memory
_target_xfer_memory:                    ## @target_xfer_memory
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testl	%edx, %edx
	jle	LBB0_19
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	jle	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	%rbx, %rdi
	callq	_lookup_mem_region
	movq	%rax, %r14
	movl	%r15d, %eax
	addq	%rbx, %rax
	movq	(%r14), %rcx
	movl	%ecx, %r12d
	subl	%ebx, %r12d
	cmpq	%rcx, %rax
	cmovll	%r15d, %r12d
	movl	8(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, 16(%r14)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	_target_dcache@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_dcache_xfer_memory
	testl	%eax, %eax
	jg	LBB0_6
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	callq	_do_xfer_memory
	testl	%eax, %eax
	jle	LBB0_16
LBB0_6:                                 ##   in Loop: Header=BB0_12 Depth=2
	movl	%eax, %ecx
	addq	%rcx, %rbx
	addq	%rcx, %r13
	subl	%eax, %r15d
	subl	%eax, %r12d
	jg	LBB0_12
	jmp	LBB0_7
LBB0_16:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
LBB0_18:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_19
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_target_dcache,4,2              ## @target_dcache
	.comm	_errno,8,3                      ## @errno
	.no_dead_strip	_target_xfer_memory
.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
_target_xfer_memory:                    ; @target_xfer_memory
	.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
	cmp	w2, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x26, _target_dcache@GOTPAGE
Lloh1:
	ldr	x26, [x26, _target_dcache@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x0, x22
	bl	_lookup_mem_region
	mov	x23, x0
	add	x8, x22, w19, uxtw
	ldr	x9, [x0]
	sub	w10, w9, w22
	cmp	x8, x9
	csel	w24, w19, w10, lt
	mov	x25, x0
	ldr	w8, [x25, #8]!
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #129
	ccmp	w21, #0, #4, eq
	b.eq	LBB0_5
	b	LBB0_14
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w21, LBB0_14
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w24, #1
	b.ge	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w19, #1
	b.ge	LBB0_2
	b	LBB0_15
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x22
	mov	x1, x20
	mov	x2, x24
	mov	x3, x21
	mov	x4, x25
	bl	_do_xfer_memory
	cmp	w0, #0
	b.le	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	w8, w0
	add	x22, x22, x8
	add	x20, x20, x8
	sub	w19, w19, w0
	sub	w24, w24, w0
	cmp	w24, #0
	b.le	LBB0_6
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w0, [x26]
	mov	x1, x22
	mov	x2, x20
	mov	x3, x24
	mov	x4, x21
	bl	_dcache_xfer_memory
	cmp	w0, #0
	b.gt	LBB0_8
LBB0_11:
	cbnz	w21, LBB0_13
; %bb.12:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_memset
LBB0_13:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	cbnz	x0, LBB0_16
LBB0_14:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
                                        ; kill: def $w0 killed $w0 killed $x0
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_target_dcache,4,2              ; @target_dcache
	.comm	_errno,8,3                      ; @errno
	.no_dead_strip	_target_xfer_memory
.subsections_via_symbols
