	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pearl_alloc_bd_table
_pearl_alloc_bd_table:                  ## @pearl_alloc_bd_table
	.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	%rdi, %r13
	movl	52(%rdi), %ebx
	addl	48(%rdi), %ebx
	shll	$2, %ebx
	movq	72(%rdi), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movl	%ebx, %esi
	callq	_dmam_alloc_coherent
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	%r12, 40(%r13)
	movl	-44(%rbp), %eax
	movl	%eax, (%r13)
	movl	%ebx, 4(%r13)
	movq	%r12, 32(%r13)
	movl	%eax, 8(%r13)
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %r15
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_pr_debug
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r13)
	movslq	48(%r13), %rax
	leal	(,%rax,4), %edi
	addl	-44(%rbp), %edi
	leaq	(%r12,%rax,4), %r12
	movl	%edi, -44(%rbp)
	movq	%r12, 24(%r13)
	movl	%edi, 12(%r13)
	callq	_QTN_HOST_LO32
	movl	%eax, %ebx
	movl	16(%r13), %edi
	callq	_PCIE_HDP_TX_HOST_Q_BASE_L
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movl	$262144, %ebx                   ## imm = 0x40000
	orl	52(%r13), %ebx
	movl	16(%r13), %edi
	callq	_PCIE_HDP_TX_HOST_Q_SZ_CTRL
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_pr_debug
	jmp	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX descriptor table: vaddr=0x%p paddr=%pad\n"

L_.str.1:                               ## @.str.1
	.asciz	"RX descriptor table: vaddr=0x%p paddr=%pad\n"

	.no_dead_strip	_pearl_alloc_bd_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pearl_alloc_bd_table
_pearl_alloc_bd_table:                  ; @pearl_alloc_bd_table
	.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	x19, x0
	ldp	w8, w9, [x0, #48]
	add	w8, w9, w8
	lsl	w21, w8, #2
	ldr	x0, [x0, #72]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x1, x21
	bl	_dmam_alloc_coherent
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldr	w8, [sp, #12]
	stp	w8, w21, [x19]
	stp	x20, x20, [x19, #32]
	str	w8, [x19, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x1, x20
	bl	_pr_debug
	stp	xzr, xzr, [x19, #56]
	ldrsw	x8, [x19, #48]
	add	x20, x20, x8, lsl #2
	ldr	w9, [sp, #12]
	add	w0, w9, w8, lsl #2
	str	w0, [sp, #12]
	str	x20, [x19, #24]
	str	w0, [x19, #12]
	bl	_QTN_HOST_LO32
	mov	x21, x0
	ldr	w0, [x19, #16]
	bl	_PCIE_HDP_TX_HOST_Q_BASE_L
	mov	x1, x0
	mov	x0, x21
	bl	_writel
	ldr	w8, [x19, #52]
	orr	w21, w8, #0x40000
	ldr	w0, [x19, #16]
	bl	_PCIE_HDP_TX_HOST_Q_SZ_CTRL
	mov	x1, x0
	mov	x0, x21
	bl	_writel
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x2, sp, #12
	mov	x1, x20
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX descriptor table: vaddr=0x%p paddr=%pad\n"

l_.str.1:                               ; @.str.1
	.asciz	"RX descriptor table: vaddr=0x%p paddr=%pad\n"

	.no_dead_strip	_pearl_alloc_bd_table
.subsections_via_symbols
