	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scif_rma_list_dma_copy_wrapper
_scif_rma_list_dma_copy_wrapper:        ## @scif_rma_list_dma_copy_wrapper
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	(%rsi), %r12d
	movslq	4(%rsi), %r13
	movl	(%rdx), %edi
	movl	$1, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_is_dma_copy_aligned
	testq	%rax, %rax
	je	LBB0_1
## %bb.24:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__scif_rma_list_dma_copy_aligned ## TAILCALL
LBB0_1:
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	decq	%r15
	andl	%r15d, %r12d
	andq	%r13, %r15
	cmpl	%r12d, %r15d
	jne	LBB0_2
## %bb.25:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scif_rma_list_dma_copy_aligned ## TAILCALL
LBB0_2:
	cmpq	$0, 40(%rbx)
	je	LBB0_3
## %bb.26:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scif_rma_list_cpu_copy         ## TAILCALL
LBB0_3:
	movq	24(%rbx), %rax
	movq	(%rax), %rcx
	movq	_SCIF_WINDOW_SELF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rcx
	sete	-41(%rbp)                       ## 1-byte Folded Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_22
## %bb.4:
	movq	%rax, %r13
	movq	%rax, 32(%rbx)
	movq	%rax, 56(%rax)
	movq	_scif_rma_completion_cb@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r13)
	movl	16(%rbx), %eax
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	leal	(%rax,%rcx,2), %ecx
	movslq	%ecx, %rcx
	movq	_SCIF_KMEM_UNALIGNED_BUF_SIZE@GOTPCREL(%rip), %rsi
	cmpq	%rcx, (%rsi)
	jle	LBB0_9
## %bb.5:
	movl	$0, (%r13)
	movl	(%rdx), %ecx
	leal	(%rax,%rcx,2), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.6:
	movq	%rax, %rdi
	movq	%rax, 16(%r13)
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_9:
	movl	$1, (%r13)
	movq	_unaligned_cache@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmem_cache_alloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.10:
	movq	%rax, %rdx
	movq	%rax, 16(%r13)
	jmp	LBB0_11
LBB0_8:
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_PTR_ALIGN
	movq	%rax, %rdx
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_13
## %bb.12:
	shlq	$6, %r15
	addq	%r15, %rdx
	movq	24(%rbx), %rsi
	movl	(%rbx), %edi
	movl	16(%rbx), %ecx
	movq	%rdx, %r15
	movl	$1, %r8d
	callq	_scif_rma_local_cpu_copy
	jmp	LBB0_14
LBB0_13:
	movl	20(%rbx), %eax
	movl	%eax, 44(%r13)
	movl	4(%rbx), %eax
	movl	%eax, 4(%r13)
	subl	%r12d, (%rbx)
	movl	16(%rbx), %edi
	movl	%edi, 40(%r13)
	addl	%r12d, %edi
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %r15
	callq	_ALIGN
	movl	%eax, 16(%rbx)
	movl	%r12d, 8(%r13)
LBB0_14:
	movq	%r15, 32(%r13)
	movq	%r13, %rdi
	addq	$28, %rdi
	movl	12(%rbx), %edx
	movq	_SCIF_KMEM_UNALIGNED_BUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r15, %rsi
	callq	_scif_map_single
	testl	%eax, %eax
	je	LBB0_15
LBB0_18:
	cmpl	$0, (%r13)
	je	LBB0_20
## %bb.19:
	movq	_unaligned_cache@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r13), %rsi
	callq	_kmem_cache_free
	jmp	LBB0_21
LBB0_15:
	xorl	%ecx, %ecx
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, %cl
	movl	12(%rbx), %eax
	movl	%eax, 24(%r13)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_scif_rma_list_dma_copy_unaligned
	testq	%rax, %rax
	js	LBB0_18
## %bb.16:
	xorl	%eax, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_23
## %bb.17:
	movq	_SCIF_DMA_INTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	jmp	LBB0_23
LBB0_20:
	movq	16(%r13), %rdi
	callq	_kfree
LBB0_21:
	movq	%r13, %rdi
	callq	_kfree
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L1_CACHE_BYTES,4,2             ## @L1_CACHE_BYTES
	.comm	_SCIF_WINDOW_SELF,8,3           ## @SCIF_WINDOW_SELF
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_scif_rma_completion_cb,4,2     ## @scif_rma_completion_cb
	.comm	_SCIF_KMEM_UNALIGNED_BUF_SIZE,8,3 ## @SCIF_KMEM_UNALIGNED_BUF_SIZE
	.comm	_unaligned_cache,4,2            ## @unaligned_cache
	.comm	_SCIF_DMA_INTR,4,2              ## @SCIF_DMA_INTR
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_scif_rma_list_dma_copy_wrapper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scif_rma_list_dma_copy_wrapper
_scif_rma_list_dma_copy_wrapper:        ; @scif_rma_list_dma_copy_wrapper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	ldp	w21, w22, [x1]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	ldr	w0, [x2]
	mov	w1, #1
	mov	w2, #1
	mov	w3, #1
	bl	_is_dma_copy_aligned
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	__scif_rma_list_dma_copy_aligned
LBB0_2:
Lloh0:
	adrp	x27, _L1_CACHE_BYTES@GOTPAGE
Lloh1:
	ldr	x27, [x27, _L1_CACHE_BYTES@GOTPAGEOFF]
	ldrsw	x8, [x27]
	sub	x8, x8, #1
	and	w26, w8, w21
	and	x28, x8, x22
	cmp	w28, w26
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_scif_rma_list_dma_copy_aligned
LBB0_4:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_scif_rma_list_cpu_copy
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	x24, [x8]
Lloh2:
	adrp	x8, _SCIF_WINDOW_SELF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SCIF_WINDOW_SELF@GOTPAGEOFF]
Lloh4:
	ldr	x25, [x8]
	cmp	x24, x25
	cset	w22, eq
Lloh5:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #64
	bl	_kzalloc
	cbz	x0, LBB0_24
; %bb.7:
	mov	x21, x0
	str	w22, [sp, #12]                  ; 4-byte Folded Spill
	str	x0, [x19, #32]
Lloh7:
	adrp	x8, _scif_rma_completion_cb@GOTPAGE
Lloh8:
	ldr	x8, [x8, _scif_rma_completion_cb@GOTPAGEOFF]
	stp	x8, x0, [x0, #48]
	ldr	w8, [x19, #16]
	ldr	w9, [x27]
	add	w9, w8, w9, lsl #1
Lloh9:
	adrp	x22, _SCIF_KMEM_UNALIGNED_BUF_SIZE@GOTPAGE
Lloh10:
	ldr	x22, [x22, _SCIF_KMEM_UNALIGNED_BUF_SIZE@GOTPAGEOFF]
	ldr	x10, [x22]
	cmp	x10, w9, sxtw
	b.le	LBB0_11
; %bb.8:
	str	wzr, [x21]
	ldr	w9, [x27]
	add	w0, w8, w9, lsl #1
	ldr	w1, [x23]
	bl	_kmalloc
	cbz	x0, LBB0_23
; %bb.9:
	mov	x23, x0
	str	x0, [x21, #16]
	ldr	w1, [x27]
	bl	_IS_ALIGNED
	cbnz	w0, LBB0_13
; %bb.10:
	ldr	w1, [x27]
	mov	x0, x23
	bl	_PTR_ALIGN
	mov	x23, x0
	b	LBB0_13
LBB0_11:
	mov	w8, #1
	str	w8, [x21]
Lloh11:
	adrp	x8, _unaligned_cache@GOTPAGE
Lloh12:
	ldr	x8, [x8, _unaligned_cache@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [x23]
	bl	_kmem_cache_alloc
	cbz	x0, LBB0_23
; %bb.12:
	mov	x23, x0
	str	x0, [x21, #16]
LBB0_13:
	cmp	x24, x25
	b.ne	LBB0_15
; %bb.14:
	add	x23, x23, x28, lsl #6
	ldr	w0, [x19]
	ldr	x1, [x19, #24]
	ldr	w3, [x19, #16]
	mov	x2, x23
	mov	w4, #1
	bl	_scif_rma_local_cpu_copy
	b	LBB0_16
LBB0_15:
	ldp	w9, w8, [x19]
	str	w8, [x21, #4]
	sub	w8, w9, w26
	str	w8, [x19]
	ldr	d0, [x19, #16]
	str	d0, [x21, #40]
	fmov	w8, s0
	add	w0, w8, w26
	ldr	w1, [x27]
	bl	_ALIGN
	str	w0, [x19, #16]
	str	w26, [x21, #8]
LBB0_16:
	str	x23, [x21, #32]
	add	x0, x21, #28
	ldr	w2, [x19, #12]
	ldr	x3, [x22]
	mov	x1, x23
	bl	_scif_map_single
	cbz	w0, LBB0_19
LBB0_17:
	ldr	w8, [x21]
	cbz	w8, LBB0_22
; %bb.18:
Lloh14:
	adrp	x8, _unaligned_cache@GOTPAGE
Lloh15:
	ldr	x8, [x8, _unaligned_cache@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x1, [x21, #16]
	bl	_kmem_cache_free
	b	LBB0_23
LBB0_19:
	ldr	w8, [x19, #12]
	str	w8, [x21, #24]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	bl	_scif_rma_list_dma_copy_unaligned
	tbnz	x0, #63, LBB0_17
; %bb.20:
	cmp	x24, x25
	b.ne	LBB0_26
; %bb.21:
	mov	w0, #0
	b	LBB0_25
LBB0_22:
	ldr	x0, [x21, #16]
	bl	_kfree
LBB0_23:
	mov	x0, x21
	bl	_kfree
LBB0_24:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_25:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_26:
	mov	w0, #0
Lloh20:
	adrp	x8, _SCIF_DMA_INTR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SCIF_DMA_INTR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_25
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_L1_CACHE_BYTES,4,2             ; @L1_CACHE_BYTES
	.comm	_SCIF_WINDOW_SELF,8,3           ; @SCIF_WINDOW_SELF
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_scif_rma_completion_cb,4,2     ; @scif_rma_completion_cb
	.comm	_SCIF_KMEM_UNALIGNED_BUF_SIZE,8,3 ; @SCIF_KMEM_UNALIGNED_BUF_SIZE
	.comm	_unaligned_cache,4,2            ; @unaligned_cache
	.comm	_SCIF_DMA_INTR,4,2              ; @SCIF_DMA_INTR
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_scif_rma_list_dma_copy_wrapper
.subsections_via_symbols
