	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grcan_allocate_dma_buffers
_grcan_allocate_dma_buffers:            ## @grcan_allocate_dma_buffers
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_max
	movq	_GRCAN_BUFFER_ALIGNMENT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_ALIGN
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_min
	leaq	(%rax,%rbx), %rsi
	movq	_GRCAN_BUFFER_ALIGNMENT@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%rsi, 64(%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	40(%r12), %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rbx
	addq	$16, %rbx
	cmpq	%r15, %r14
	movq	%rbx, %r13
	cmovaq	%rax, %r13
	cmovbeq	%rax, %rbx
	movq	%r15, 40(%r12)
	movq	%r14, 16(%r12)
	movq	(%r12), %rdi
	movq	_GRCAN_BUFFER_ALIGNMENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_ALIGN
	movq	%rax, 8(%rbx)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rax,%rdx), %rcx
	movq	%rcx, 8(%r13)
	subq	(%r12), %rax
	addq	8(%r12), %rax
	movq	%rax, 16(%rbx)
	addq	%rdx, %rax
	movq	%rax, 16(%r13)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRCAN_BUFFER_ALIGNMENT,8,3     ## @GRCAN_BUFFER_ALIGNMENT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_grcan_allocate_dma_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grcan_allocate_dma_buffers
_grcan_allocate_dma_buffers:            ; @grcan_allocate_dma_buffers
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x21
	mov	x1, x20
	bl	_max
Lloh0:
	adrp	x24, _GRCAN_BUFFER_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GRCAN_BUFFER_ALIGNMENT@GOTPAGEOFF]
	ldr	x1, [x24]
	bl	_ALIGN
	mov	x22, x0
	mov	x0, x21
	mov	x1, x20
	bl	_min
	ldr	x8, [x24]
	add	x9, x0, x22
	add	x1, x9, x8
	str	x1, [x19, #64]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x2, x19
	bl	_dma_alloc_coherent
	str	x0, [x19, #8]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x8, x19
	str	x21, [x8, #40]!
	mov	x9, x19
	str	x20, [x9, #16]!
	cmp	x20, x21
	csel	x20, x8, x9, hi
	csel	x21, x9, x8, hi
	ldr	x0, [x19]
	ldr	x1, [x24]
	bl	_ALIGN
	mov	x8, x0
	mov	w0, #0
	add	x9, x8, x22
	ldp	x10, x11, [x19]
	sub	x10, x8, x10
	add	x10, x11, x10
	stp	x8, x10, [x21, #8]
	add	x8, x10, x22
	stp	x9, x8, [x20, #8]
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GRCAN_BUFFER_ALIGNMENT,8,3     ; @GRCAN_BUFFER_ALIGNMENT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_grcan_allocate_dma_buffers
.subsections_via_symbols
