	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_adc_dma_init
_at91_adc_dma_init:                     ## @at91_adc_dma_init
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_platform_get_drvdata
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	_AT91_HWFIFO_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AT91_BUFFER_MAX_CONVERSION_BYTES@GOTPCREL(%rip), %rax
	imull	(%rax), %edi
	movaps	%xmm0, -64(%rbp)
	addl	%edi, %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_DIV_ROUND_UP
	cmpq	$0, (%rbx)
	jne	LBB0_9
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dma_request_slave_channel
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	imull	%r15d, %esi
	movq	%rbx, %rdx
	addq	$8, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_AT91_SAMA5D2_LCDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	16(%rbx), %rax
	movq	%rax, -48(%rbp)
	movq	_DMA_SLAVE_BUSWIDTH_2_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -64(%rbp)
	movq	(%rbx), %rdi
	leaq	-64(%rbp), %rsi
	callq	_dmaengine_slave_config
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	imull	(%r12), %r15d
	movl	12(%rbx), %edx
	movl	8(%rbx), %ecx
	movl	%r15d, %esi
	callq	_dma_free_coherent
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
LBB0_7:
	movq	(%rbx), %rdi
	callq	_dma_release_channel
	movq	$0, (%rbx)
LBB0_8:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
LBB0_9:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	(%rbx), %rdi
	callq	_dma_chan_name
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_HWFIFO_MAX_SIZE,4,2       ## @AT91_HWFIFO_MAX_SIZE
	.comm	_AT91_BUFFER_MAX_CONVERSION_BYTES,4,2 ## @AT91_BUFFER_MAX_CONVERSION_BYTES
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx"

L_.str.1:                               ## @.str.1
	.asciz	"can't get DMA channel\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"can't allocate coherent DMA area\n"

	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_AT91_SAMA5D2_LCDR,8,3          ## @AT91_SAMA5D2_LCDR
	.comm	_DMA_SLAVE_BUSWIDTH_2_BYTES,4,2 ## @DMA_SLAVE_BUSWIDTH_2_BYTES
L_.str.3:                               ## @.str.3
	.asciz	"can't configure DMA slave\n"

L_.str.4:                               ## @.str.4
	.asciz	"using %s for rx DMA transfers\n"

L_.str.5:                               ## @.str.5
	.asciz	"continuing without DMA support\n"

	.no_dead_strip	_at91_adc_dma_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_adc_dma_init
_at91_adc_dma_init:                     ; @at91_adc_dma_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	bl	_platform_get_drvdata
	bl	_iio_priv
	mov	x20, x0
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
Lloh0:
	adrp	x8, _AT91_HWFIFO_MAX_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AT91_HWFIFO_MAX_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AT91_BUFFER_MAX_CONVERSION_BYTES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AT91_BUFFER_MAX_CONVERSION_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mul	w8, w8, w9
	lsl	w0, w8, #1
Lloh6:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_DIV_ROUND_UP
	ldr	x8, [x20]
	cbnz	x8, LBB0_10
; %bb.1:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dma_request_slave_channel
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x0]
	ldr	w0, [x8]
	ldr	w8, [x22]
	mul	w1, w8, w21
	add	x2, x20, #8
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	bl	_dma_alloc_coherent
	str	w0, [x20, #12]
	cbz	w0, LBB0_6
; %bb.3:
Lloh13:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	ldr	x8, [x20, #16]
Lloh16:
	adrp	x9, _AT91_SAMA5D2_LCDR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AT91_SAMA5D2_LCDR@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh19:
	adrp	x9, _DMA_SLAVE_BUSWIDTH_2_BYTES@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DMA_SLAVE_BUSWIDTH_2_BYTES@GOTPAGEOFF]
	str	x8, [sp, #32]
Lloh21:
	ldr	w8, [x9]
	str	w8, [sp, #24]
	movi.2s	v0, #1
	str	d0, [sp, #16]
	ldr	x0, [x20]
	add	x1, sp, #16
	bl	_dmaengine_slave_config
	cbz	x0, LBB0_11
; %bb.4:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w8, [x22]
	mul	w1, w8, w21
	ldp	w3, w2, [x20, #8]
	bl	_dma_free_coherent
	b	LBB0_7
LBB0_5:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_8
LBB0_6:
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_info
LBB0_7:
	ldr	x0, [x20]
	bl	_dma_release_channel
	str	xzr, [x20]
LBB0_8:
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_info
LBB0_10:
	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
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	x0, [x20]
	bl	_dma_chan_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_HWFIFO_MAX_SIZE,4,2       ; @AT91_HWFIFO_MAX_SIZE
	.comm	_AT91_BUFFER_MAX_CONVERSION_BYTES,4,2 ; @AT91_BUFFER_MAX_CONVERSION_BYTES
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx"

l_.str.1:                               ; @.str.1
	.asciz	"can't get DMA channel\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"can't allocate coherent DMA area\n"

	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_AT91_SAMA5D2_LCDR,8,3          ; @AT91_SAMA5D2_LCDR
	.comm	_DMA_SLAVE_BUSWIDTH_2_BYTES,4,2 ; @DMA_SLAVE_BUSWIDTH_2_BYTES
l_.str.3:                               ; @.str.3
	.asciz	"can't configure DMA slave\n"

l_.str.4:                               ; @.str.4
	.asciz	"using %s for rx DMA transfers\n"

l_.str.5:                               ; @.str.5
	.asciz	"continuing without DMA support\n"

	.no_dead_strip	_at91_adc_dma_init
.subsections_via_symbols
