	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_async_tx_submit
_ntb_async_tx_submit:                   ## @ntb_async_tx_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	16(%rdi), %rax
	movq	(%rsi), %rcx
	movq	16(%rsi), %r13
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r12
	movslq	(%rdi), %rax
	movslq	8(%rsi), %r14
	imulq	%rax, %r14
	addq	8(%rdi), %r14
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	notq	%r15
	movq	%r14, %rdx
	andq	%r15, %rdx
	andq	%r13, %r15
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	callq	_is_dma_copy_aligned
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movl	8(%r12), %edi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_dmaengine_get_unmap_data
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	8(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movq	%rcx, %r13
	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	%r15, %rdx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_dma_map_page
	movq	16(%r13), %rcx
	movl	%eax, (%rcx)
	movl	8(%r12), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_3
LBB0_6:
	movq	%r13, %rdi
	callq	_dmaengine_unmap_put
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$1, 8(%r13)
	movq	16(%r13), %rax
	movl	(%rax), %edx
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r15, %rcx
	callq	*(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r14
	movq	_ntb_tx_copy_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	%rbx, (%r14)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_dma_set_unmap
	movq	%r14, %rdi
	callq	_dmaengine_submit
	movl	%eax, %edi
	callq	_dma_submit_error
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_dmaengine_unmap_put
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dma_async_issue_pending
	xorl	%eax, %eax
	jmp	LBB0_8
	.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_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_ntb_tx_copy_callback,4,2       ## @ntb_tx_copy_callback
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_ntb_async_tx_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_tx_submit
_ntb_async_tx_submit:                   ; @ntb_async_tx_submit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	ldr	x22, [x1]
	ldr	x26, [x1, #16]
	ldp	x8, x19, [x0, #8]
	ldr	x24, [x19]
	ldrsw	x9, [x0]
	ldrsw	x10, [x1, #8]
	madd	x23, x10, x9, x8
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	bic	x25, x26, x8
	bic	x2, x23, x8
	mov	x0, x24
	mov	x1, x25
	mov	x3, x22
	bl	_is_dma_copy_aligned
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x24, #8]
Lloh3:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_dmaengine_get_unmap_data
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	str	x22, [x0]
	ldr	w27, [x24, #8]
	mov	x0, x26
	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, x27
	mov	x2, x25
	mov	x3, x22
	bl	_dma_map_page
	mov	x1, x0
	ldr	x8, [x21, #16]
	str	w0, [x8]
	ldr	w0, [x24, #8]
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
LBB0_3:
	mov	x0, x21
	bl	_dmaengine_unmap_put
LBB0_4:
Lloh9:
	adrp	x8, _ENXIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w8, #1
	str	w8, [x21, #8]
	ldr	x8, [x24]
	ldr	x9, [x21, #16]
	ldr	w2, [x9]
Lloh12:
	adrp	x9, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x9]
	mov	x0, x19
	mov	x1, x23
	mov	x3, x22
	blr	x8
	cbz	x0, LBB0_3
; %bb.7:
	mov	x22, x0
Lloh15:
	adrp	x8, _ntb_tx_copy_callback@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ntb_tx_copy_callback@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x20, [x0]
	mov	x1, x21
	bl	_dma_set_unmap
	mov	x0, x22
	bl	_dmaengine_submit
	bl	_dma_submit_error
	mov	x20, x0
	mov	x0, x21
	bl	_dmaengine_unmap_put
	cbnz	x20, LBB0_3
; %bb.8:
	mov	x0, x19
	bl	_dma_async_issue_pending
	mov	w0, #0
	b	LBB0_5
	.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
	.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_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_ntb_tx_copy_callback,4,2       ; @ntb_tx_copy_callback
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_ntb_async_tx_submit
.subsections_via_symbols
