	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_bm_pool_create
_mvneta_bm_pool_create:                 ## @mvneta_bm_pool_create
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movl	16(%rsi), %r12d
	shll	$2, %r12d
	leaq	4(%rsi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_MVNETA_BM_POOL_PTR_ALIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_mvebu_mbus_get_dram_win_info
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	(%r13), %edi
	callq	_MVNETA_BM_POOL_BASE_REG
	movl	4(%r13), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mvneta_bm_write
	movl	(%r13), %esi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%r14, %rdi
	callq	_mvneta_bm_pool_target_set
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_mvneta_bm_pool_enable
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_3:
	movq	8(%r13), %rdx
	movl	4(%r13), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_dma_free_coherent
	movl	(%r13), %edx
	movq	_MVNETA_BM_POOL_PTR_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ebx
	movq	8(%r13), %rdx
	movl	4(%r13), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_dma_free_coherent
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %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	_MVNETA_BM_POOL_PTR_ALIGN,4,2   ## @MVNETA_BM_POOL_PTR_ALIGN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BM pool %d is not %d bytes aligned\n"

	.no_dead_strip	_mvneta_bm_pool_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvneta_bm_pool_create
_mvneta_bm_pool_create:                 ; @mvneta_bm_pool_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	ldr	w8, [x1, #16]
	lsl	w22, w8, #2
	add	x23, x1, #4
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_dma_alloc_coherent
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x24, _MVNETA_BM_POOL_PTR_ALIGN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MVNETA_BM_POOL_PTR_ALIGN@GOTPAGEOFF]
	ldr	w1, [x24]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_IS_ALIGNED
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x23]
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_mvebu_mbus_get_dram_win_info
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w0, [x19]
	bl	_MVNETA_BM_POOL_BASE_REG
	mov	x1, x0
	ldr	w2, [x19, #4]
	mov	x0, x20
	bl	_mvneta_bm_write
	ldr	w1, [x19]
	ldp	w3, w2, [sp, #8]
	mov	x0, x20
	bl	_mvneta_bm_pool_target_set
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mvneta_bm_pool_enable
	mov	w23, #0
	b	LBB0_7
LBB0_4:
	ldr	x2, [x19, #8]
	ldr	w3, [x19, #4]
	mov	x0, x21
	mov	x1, x22
	bl	_dma_free_coherent
	ldr	w2, [x19]
	ldr	w3, [x24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_6:
	mov	x23, x0
	ldr	x2, [x19, #8]
	ldr	w3, [x19, #4]
	mov	x0, x21
	mov	x1, x22
	bl	_dma_free_coherent
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MVNETA_BM_POOL_PTR_ALIGN,4,2   ; @MVNETA_BM_POOL_PTR_ALIGN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BM pool %d is not %d bytes aligned\n"

	.no_dead_strip	_mvneta_bm_pool_create
.subsections_via_symbols
