	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_async_rx_submit
_ntb_async_rx_submit:                   ## @ntb_async_rx_submit
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r12
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	notq	%r13
	movq	%r13, %r14
	andq	%rsi, %r14
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	andq	%rdx, %r13
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	_is_dma_copy_aligned
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movl	8(%r12), %edi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$2, %esi
	callq	_dmaengine_get_unmap_data
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %rcx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rbx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, (%rax)
	movl	8(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movq	%rcx, %r15
	callq	_virt_to_page
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_dma_map_page
	movq	16(%r15), %rcx
	movq	%rax, (%rcx)
	movl	8(%rbx), %edi
	movq	16(%r15), %rax
	movq	(%rax), %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movl	$1, 8(%r15)
	movl	8(%rbx), %r14d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_virt_to_page
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r14d, %edi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, %esi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_dma_map_page
	movq	16(%r15), %rcx
	movq	%rax, 8(%rcx)
	movl	8(%rbx), %edi
	movq	16(%r15), %rax
	movq	8(%rax), %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	movq	%r15, %rdi
	callq	_dmaengine_unmap_put
LBB0_8:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, 12(%r15)
	movq	16(%r15), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	*(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %rbx
	movq	_ntb_rx_copy_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_dma_set_unmap
	movq	%rbx, %rdi
	callq	_dmaengine_submit
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_dma_submit_error
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_dmaengine_unmap_put
	testq	%rbx, %rbx
	jne	LBB0_7
## %bb.6:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, 4(%rax)
	incl	(%rax)
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_ntb_rx_copy_callback,4,2       ## @ntb_rx_copy_callback
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_ntb_async_rx_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntb_async_rx_submit
_ntb_async_rx_submit:                   ; @ntb_async_rx_submit
	.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	x27, x1
	mov	x19, x0
	ldp	x25, x28, [x0, #8]
	ldr	x22, [x28, #8]
	ldr	x21, [x0]
	ldr	x23, [x22]
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	bic	x26, x1, x8
	bic	x24, x25, x8
	mov	x0, x23
	mov	x1, x26
	mov	x2, x24
	mov	x3, x21
	bl	_is_dma_copy_aligned
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x23, #8]
Lloh3:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #2
	bl	_dmaengine_get_unmap_data
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	str	x28, [sp, #8]                   ; 8-byte Folded Spill
	str	x21, [x0]
	ldr	w28, [x23, #8]
	mov	x0, x27
	bl	_virt_to_page
	mov	x1, x0
Lloh6:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x28
	mov	x2, x26
	mov	x3, x21
	bl	_dma_map_page
	ldr	x8, [x20, #16]
	str	x0, [x8]
	ldr	w0, [x23, #8]
	ldr	x8, [x20, #16]
	ldr	x1, [x8]
	bl	_dma_mapping_error
	cbnz	x0, LBB0_4
; %bb.3:
	mov	w27, #1
	str	w27, [x20, #8]
	ldr	w26, [x23, #8]
	mov	x0, x25
	bl	_virt_to_page
	mov	x1, x0
Lloh9:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x0, x26
	mov	x2, x24
	mov	x3, x21
	bl	_dma_map_page
	ldr	x8, [x20, #16]
	str	x0, [x8, #8]
	ldr	w0, [x23, #8]
	ldr	x8, [x20, #16]
	ldr	x1, [x8, #8]
	bl	_dma_mapping_error
	cbz	x0, LBB0_7
LBB0_4:
	mov	x0, x20
	bl	_dmaengine_unmap_put
LBB0_5:
Lloh12:
	adrp	x8, _ENXIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
	str	w27, [x20, #12]
	ldr	x8, [x23]
	ldr	x9, [x20, #16]
	ldp	x2, x1, [x9]
Lloh15:
	adrp	x9, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x9]
	mov	x0, x22
	mov	x3, x21
	blr	x8
	cbz	x0, LBB0_4
; %bb.8:
	mov	x21, x0
Lloh18:
	adrp	x8, _ntb_rx_copy_callback@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ntb_rx_copy_callback@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x19, [x0]
	mov	x1, x20
	bl	_dma_set_unmap
	mov	x0, x21
	bl	_dmaengine_submit
	mov	x19, x0
	bl	_dma_submit_error
	mov	x21, x0
	mov	x0, x20
	bl	_dmaengine_unmap_put
	cbnz	x21, LBB0_4
; %bb.9:
	mov	w0, #0
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x9]
	add	w8, w8, #1
	stp	w8, w19, [x9]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_ntb_rx_copy_callback,4,2       ; @ntb_rx_copy_callback
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_ntb_async_rx_submit
.subsections_via_symbols
