	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iio_dmaengine_buffer_alloc     ## -- Begin function iio_dmaengine_buffer_alloc
	.p2align	4, 0x90
_iio_dmaengine_buffer_alloc:            ## @iio_dmaengine_buffer_alloc
	.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, %r14
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r13
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dma_request_slave_channel_reason
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_PTR_ERR
LBB0_3:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_kfree
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_dma_get_slave_caps
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	-48(%rbp), %rdi
	movl	$1, %r15d
	movl	$1, %r12d
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	___ffs
	movl	%eax, %r12d
LBB0_7:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	___ffs
	movl	%eax, %r15d
LBB0_9:
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %ebx
	leaq	32(%r13), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, 24(%r13)
	movl	%ebx, (%r13)
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_dma_get_max_seg_size
	movl	%eax, 16(%r13)
	movq	%r13, %rbx
	addq	$8, %rbx
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	_iio_dmaengine_default_ops@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_iio_dma_buffer_init
	movq	_iio_dmaengine_buffer_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r13)
LBB0_10:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_iio_dmaengine_default_ops,4,2  ## @iio_dmaengine_default_ops
	.comm	_iio_dmaengine_buffer_ops,4,2   ## @iio_dmaengine_buffer_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iio_dmaengine_buffer_alloc     ; -- Begin function iio_dmaengine_buffer_alloc
	.p2align	2
_iio_dmaengine_buffer_alloc:            ; @iio_dmaengine_buffer_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x20
	bl	_dma_request_slave_channel_reason
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_PTR_ERR
LBB0_3:
	mov	x21, x0
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	bl	_ERR_PTR
	mov	x21, x0
	b	LBB0_12
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_PTR
LBB0_5:
	mov	x1, sp
	mov	x0, x20
	bl	_dma_get_slave_caps
	tbnz	w0, #31, LBB0_3
; %bb.6:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_9
; %bb.7:
	bl	___ffs
	mov	x21, x0
	ldr	x0, [sp]
	cbz	x0, LBB0_10
LBB0_8:
	bl	___ffs
	mov	x1, x0
	b	LBB0_11
LBB0_9:
	mov	w21, #1
	ldr	x0, [sp]
	cbnz	x0, LBB0_8
LBB0_10:
	mov	w1, #1
LBB0_11:
	mov	x0, x21
	bl	_max
	mov	x21, x0
	add	x0, x19, #32
	bl	_INIT_LIST_HEAD
	str	x20, [x19, #24]
	str	w21, [x19]
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_dma_get_max_seg_size
	str	w0, [x19, #16]
	add	x21, x19, #8
	ldr	x8, [x20]
	ldr	w1, [x8]
Lloh6:
	adrp	x2, _iio_dmaengine_default_ops@GOTPAGE
Lloh7:
	ldr	x2, [x2, _iio_dmaengine_default_ops@GOTPAGEOFF]
	mov	x0, x21
	bl	_iio_dma_buffer_init
Lloh8:
	adrp	x8, _iio_dmaengine_buffer_ops@GOTPAGE
Lloh9:
	ldr	x8, [x8, _iio_dmaengine_buffer_ops@GOTPAGEOFF]
	str	x8, [x19, #8]
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_iio_dmaengine_default_ops,4,2  ; @iio_dmaengine_default_ops
	.comm	_iio_dmaengine_buffer_ops,4,2   ; @iio_dmaengine_buffer_ops
.subsections_via_symbols
