	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmci_pdc_set_single_buf
_atmci_pdc_set_single_buf:              ## @atmci_pdc_set_single_buf
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_XFER_RECEIVE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	movq	_ATMEL_PDC_TCR@GOTPCREL(%rip), %rax
	cmoveq	_ATMEL_PDC_RCR@GOTPCREL(%rip), %rax
	movq	_ATMEL_PDC_TPR@GOTPCREL(%rip), %rcx
	cmoveq	_ATMEL_PDC_RPR@GOTPCREL(%rip), %rcx
	movq	_PDC_SECOND_BUF@GOTPCREL(%rip), %rsi
	xorl	%r14d, %r14d
	cmpl	%edx, (%rsi)
	jne	LBB0_2
## %bb.1:
	movq	_ATMEL_PDC_SCND_BUF_OFF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
LBB0_2:
	movl	(%rcx), %ebx
	addl	%r14d, %ebx
	addl	(%rax), %r14d
	cmpl	$0, 20(%r15)
	je	LBB0_3
## %bb.4:
	movl	16(%r15), %edi
	callq	_sg_dma_len
	movl	%eax, %r12d
	movl	16(%r15), %edi
	callq	_sg_dma_address
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_3:
	movl	(%r15), %r12d
	movl	4(%r15), %edx
LBB0_5:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_atmci_writel
	movl	8(%r15), %edx
	cmpl	%r12d, %edx
	jbe	LBB0_6
## %bb.10:
	movl	16(%r15), %edi
	callq	_sg_dma_len
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_atmci_writel
	movl	16(%r15), %edi
	callq	_sg_dma_len
	subl	%eax, 8(%r15)
	je	LBB0_12
## %bb.11:
	movl	16(%r15), %edi
	callq	_sg_next
	movl	%eax, 16(%r15)
	jmp	LBB0_12
LBB0_6:
	testb	$3, %dl
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_atmci_writel
	movq	_ATMCI_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ATMCI_MR_PDCFBYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	12(%r15), %edx
	movq	%r15, %rdi
	jmp	LBB0_9
LBB0_8:
	shrl	$2, %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
LBB0_9:
	callq	_atmci_writel
	movl	$0, 8(%r15)
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_RECEIVE,4,2               ## @XFER_RECEIVE
	.comm	_ATMEL_PDC_RPR,4,2              ## @ATMEL_PDC_RPR
	.comm	_ATMEL_PDC_RCR,4,2              ## @ATMEL_PDC_RCR
	.comm	_ATMEL_PDC_TPR,4,2              ## @ATMEL_PDC_TPR
	.comm	_ATMEL_PDC_TCR,4,2              ## @ATMEL_PDC_TCR
	.comm	_PDC_SECOND_BUF,4,2             ## @PDC_SECOND_BUF
	.comm	_ATMEL_PDC_SCND_BUF_OFF,8,3     ## @ATMEL_PDC_SCND_BUF_OFF
	.comm	_ATMCI_MR,4,2                   ## @ATMCI_MR
	.comm	_ATMCI_MR_PDCFBYTE,4,2          ## @ATMCI_MR_PDCFBYTE
	.no_dead_strip	_atmci_pdc_set_single_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmci_pdc_set_single_buf
_atmci_pdc_set_single_buf:              ; @atmci_pdc_set_single_buf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _XFER_RECEIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_RECEIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ATMEL_PDC_RCR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATMEL_PDC_RCR@GOTPAGEOFF]
Lloh5:
	adrp	x10, _ATMEL_PDC_TCR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ATMEL_PDC_TCR@GOTPAGEOFF]
	cmp	w8, w1
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _ATMEL_PDC_RPR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ATMEL_PDC_RPR@GOTPAGEOFF]
Lloh9:
	adrp	x10, _ATMEL_PDC_TPR@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ATMEL_PDC_TPR@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _PDC_SECOND_BUF@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PDC_SECOND_BUF@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _ATMEL_PDC_SCND_BUF_OFF@GOTPAGE
Lloh15:
	ldr	x11, [x11, _ATMEL_PDC_SCND_BUF_OFF@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	cmp	w10, w2
	csel	w10, w11, wzr, eq
	add	w21, w10, w9
	add	w20, w10, w8
	ldr	w8, [x0, #20]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	bl	_sg_dma_len
	mov	x22, x0
	ldr	w0, [x19, #16]
	bl	_sg_dma_address
	mov	x2, x0
	b	LBB0_3
LBB0_2:
	ldp	w22, w2, [x19]
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	bl	_atmci_writel
	ldr	w2, [x19, #8]
	cmp	w2, w22
	b.ls	LBB0_6
; %bb.4:
	ldr	w0, [x19, #16]
	bl	_sg_dma_len
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w2, w8, #2
	mov	x0, x19
	mov	x1, x20
	bl	_atmci_writel
	ldr	w0, [x19, #16]
	bl	_sg_dma_len
	ldr	w8, [x19, #8]
	subs	w8, w8, w0
	str	w8, [x19, #8]
	b.eq	LBB0_10
; %bb.5:
	ldr	w0, [x19, #16]
	bl	_sg_next
	str	w0, [x19, #16]
	b	LBB0_10
LBB0_6:
	tst	w2, #0x3
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_atmci_writel
Lloh17:
	adrp	x8, _ATMCI_MR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATMCI_MR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w8, [x19, #12]
Lloh20:
	adrp	x9, _ATMCI_MR_PDCFBYTE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATMCI_MR_PDCFBYTE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	b	LBB0_9
LBB0_8:
	lsr	w2, w2, #2
	mov	x0, x19
	mov	x1, x20
LBB0_9:
	bl	_atmci_writel
	str	wzr, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_RECEIVE,4,2               ; @XFER_RECEIVE
	.comm	_ATMEL_PDC_RPR,4,2              ; @ATMEL_PDC_RPR
	.comm	_ATMEL_PDC_RCR,4,2              ; @ATMEL_PDC_RCR
	.comm	_ATMEL_PDC_TPR,4,2              ; @ATMEL_PDC_TPR
	.comm	_ATMEL_PDC_TCR,4,2              ; @ATMEL_PDC_TCR
	.comm	_PDC_SECOND_BUF,4,2             ; @PDC_SECOND_BUF
	.comm	_ATMEL_PDC_SCND_BUF_OFF,8,3     ; @ATMEL_PDC_SCND_BUF_OFF
	.comm	_ATMCI_MR,4,2                   ; @ATMCI_MR
	.comm	_ATMCI_MR_PDCFBYTE,4,2          ; @ATMCI_MR_PDCFBYTE
	.no_dead_strip	_atmci_pdc_set_single_buf
.subsections_via_symbols
