	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_dmaengine_buffer_submit_block
_iio_dmaengine_buffer_submit_block:     ## @iio_dmaengine_buffer_submit_block
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_iio_buffer_to_dmaengine_buffer
	movq	%rax, %r14
	movl	12(%rbx), %edi
	movl	16(%rax), %esi
	callq	_min
	movl	%eax, 4(%rbx)
	movl	12(%r14), %esi
	movl	%eax, %edi
	callq	_rounddown
	movl	%eax, 4(%rbx)
	movl	(%r14), %edi
	movl	8(%rbx), %esi
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movl	%eax, %edx
	callq	_dmaengine_prep_slave_single
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_iio_dmaengine_buffer_block_done@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%rbx, (%rax)
	movq	%rax, %rdi
	callq	_dmaengine_submit
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_dma_submit_error
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_submit_error               ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	leaq	4(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	%r14, %rsi
	addq	$8, %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	movl	(%r14), %edi
	callq	_dma_async_issue_pending
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_iio_dmaengine_buffer_block_done,4,2 ## @iio_dmaengine_buffer_block_done
	.no_dead_strip	_iio_dmaengine_buffer_submit_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_dmaengine_buffer_submit_block
_iio_dmaengine_buffer_submit_block:     ; @iio_dmaengine_buffer_submit_block
	.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	x20, x1
	bl	_iio_buffer_to_dmaengine_buffer
	mov	x19, x0
	ldr	w0, [x20, #12]
	ldr	w1, [x19, #16]
	bl	_min
	str	w0, [x20, #4]
	ldr	w1, [x19, #12]
	bl	_rounddown
	mov	x2, x0
	str	w0, [x20, #4]
	ldr	w0, [x19]
	ldr	w1, [x20, #8]
Lloh0:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	bl	_dmaengine_prep_slave_single
	cbz	x0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _iio_dmaengine_buffer_block_done@GOTPAGE
Lloh7:
	ldr	x8, [x8, _iio_dmaengine_buffer_block_done@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x20, [x0]
	bl	_dmaengine_submit
	mov	x21, x0
	bl	_dma_submit_error
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x21
	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
	b	_dma_submit_error
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irq
	add	x1, x19, #8
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock_irq
	ldr	w0, [x19]
	bl	_dma_async_issue_pending
	mov	w0, #0
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_iio_dmaengine_buffer_block_done,4,2 ; @iio_dmaengine_buffer_block_done
	.no_dead_strip	_iio_dmaengine_buffer_submit_block
.subsections_via_symbols
