	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _c4iw_write_mem_dma
__c4iw_write_mem_dma:                   ## @_c4iw_write_mem_dma
	.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	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rax
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_dma_map_single
	movl	%eax, %r13d
	movq	(%rbx), %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	$-1, %r15d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.1:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	_inline_threshold@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, -84(%rbp)                ## 4-byte Spill
	movl	%r12d, %ebx
	jge	LBB0_2
## %bb.3:
	movq	-72(%rbp), %r10                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	_T4_ULPTX_MAX_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpl	%r12d, %ebx
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_T4_ULPTX_MIN_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	movl	%ebx, %r12d
	testl	%ecx, %ebx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	negl	%eax
	andl	%ebx, %eax
	movl	%eax, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	subl	%r12d, %ebx
	movl	$0, %r9d
	cmoveq	%r10, %r9
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	callq	__c4iw_write_mem_dma_aligned
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %eax
	sarl	$5, %eax
	addl	%eax, %r14d
	movslq	%r12d, %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, %rcx
	addl	%r12d, %r13d
	movq	_inline_threshold@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	movq	-72(%rbp), %r10                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jg	LBB0_4
	jmp	LBB0_10
LBB0_2:
	movq	-72(%rbp), %r10                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
LBB0_10:
	testl	%ebx, %ebx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	je	LBB0_11
## %bb.12:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movq	%r10, %r9
	callq	__c4iw_write_mem_inline
	movl	%eax, %r15d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_8:
	movl	%eax, %r15d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	jmp	LBB0_13
LBB0_11:
	xorl	%r15d, %r15d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_13:
	movq	(%r12), %rdi
	movl	(%r13), %ecx
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_unmap_single
LBB0_14:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_inline_threshold,4,2           ## @inline_threshold
	.comm	_T4_ULPTX_MAX_DMA,4,2           ## @T4_ULPTX_MAX_DMA
	.comm	_T4_ULPTX_MIN_IO,4,2            ## @T4_ULPTX_MIN_IO
	.no_dead_strip	__c4iw_write_mem_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _c4iw_write_mem_dma
__c4iw_write_mem_dma:                   ; @_c4iw_write_mem_dma
	.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	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x25, x1
	mov	x20, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x1, x24
	bl	_dma_map_single
	mov	x27, x0
	ldr	x0, [x20]
	mov	x1, x27
	bl	_dma_mapping_error
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #-1
	b	LBB0_12
LBB0_2:
Lloh3:
	adrp	x19, _inline_threshold@GOTPAGE
Lloh4:
	ldr	x19, [x19, _inline_threshold@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, w21
	stp	w27, w21, [sp, #8]              ; 8-byte Folded Spill
	mov	x26, x21
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
Lloh5:
	adrp	x8, _T4_ULPTX_MAX_DMA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _T4_ULPTX_MAX_DMA@GOTPAGEOFF]
Lloh7:
	ldr	w28, [x8]
	cmp	w26, w28
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh8:
	adrp	x8, _T4_ULPTX_MIN_IO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _T4_ULPTX_MIN_IO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w9, w8
	and	w9, w26, w9
	bics	wzr, w26, w8
	csel	w28, w26, w9, eq
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	subs	w26, w26, w28
	csel	x5, x22, xzr, eq
	mov	x0, x20
	mov	x1, x25
	mov	x2, x28
	mov	x3, x27
	mov	x4, x23
	bl	__c4iw_write_mem_dma_aligned
	cbnz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w25, w25, w28, asr #5
	add	x24, x24, w28, sxtw
	add	w27, w28, w27
	ldr	w8, [x19]
	cmp	w26, w8
	b.gt	LBB0_3
LBB0_7:
	cbz	w26, LBB0_10
; %bb.8:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x26
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	bl	__c4iw_write_mem_inline
LBB0_9:
	mov	x21, x0
	b	LBB0_11
LBB0_10:
	mov	w21, #0
LBB0_11:
	ldp	w1, w2, [sp, #8]                ; 8-byte Folded Reload
Lloh11:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh13:
	ldr	w3, [x8]
	bl	_dma_unmap_single
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_inline_threshold,4,2           ; @inline_threshold
	.comm	_T4_ULPTX_MAX_DMA,4,2           ; @T4_ULPTX_MAX_DMA
	.comm	_T4_ULPTX_MIN_IO,4,2            ; @T4_ULPTX_MIN_IO
	.no_dead_strip	__c4iw_write_mem_dma
.subsections_via_symbols
