	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qtnf_pcie_pearl_init_xfer
_qtnf_pcie_pearl_init_xfer:             ## @qtnf_pcie_pearl_init_xfer
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_PEARL_TX_BD_SIZE_DEFAULT@GOTPCREL(%rip), %r14
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %ebx
LBB0_2:
	movl	%ebx, %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leal	(,%rbx,4), %eax
	movq	_PCIE_HHBM_MAX_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_warn
	movl	(%r14), %ebx
LBB0_5:
	movl	%ebx, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movl	4(%r15), %edi
	xorl	%r14d, %r14d
	movl	$0, %esi
	testl	%edi, %edi
	je	LBB0_7
## %bb.6:
	callq	_is_power_of_2
	movl	4(%r15), %esi
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	leal	(,%rsi,4), %eax
	movq	_PCIE_HHBM_MAX_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	callq	_pearl_hhbm_init
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_20
LBB0_13:
	movq	%r15, %rdi
	callq	_qtnf_pcie_alloc_skb_array
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_20
LBB0_15:
	movq	%r15, %rdi
	callq	_pearl_alloc_bd_table
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_20
LBB0_17:
	movq	%r15, %rdi
	callq	_pearl_alloc_rx_buffers
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	%eax, %r14d
	leaq	L_.str.6(%rip), %rdi
LBB0_20:
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_21
LBB0_18:
	xorl	%r14d, %r14d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_PEARL_TX_BD_SIZE_DEFAULT,8,3   ## @PEARL_TX_BD_SIZE_DEFAULT
	.comm	_PCIE_HHBM_MAX_SIZE,4,2         ## @PCIE_HHBM_MAX_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad tx_bd_size value %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"rx_bd_size_param %u is not power of two\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"rx_bd_size_param %u is too large\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to init h/w queues\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate skb array\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to allocate bd table\n"

L_.str.6:                               ## @.str.6
	.asciz	"failed to allocate rx buffers\n"

	.no_dead_strip	_qtnf_pcie_pearl_init_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qtnf_pcie_pearl_init_xfer
_qtnf_pcie_pearl_init_xfer:             ; @qtnf_pcie_pearl_init_xfer
	.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
Lloh0:
	adrp	x22, _PEARL_TX_BD_SIZE_DEFAULT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PEARL_TX_BD_SIZE_DEFAULT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w1, #0
	csel	w20, w8, w1, eq
	mov	x0, x20
	bl	_is_power_of_2
Lloh2:
	adrp	x21, _PCIE_HHBM_MAX_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCIE_HHBM_MAX_SIZE@GOTPAGEOFF]
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w20, lsl #2
	b.ge	LBB0_3
LBB0_2:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_warn
	ldr	w20, [x22]
LBB0_3:
	str	w20, [x19]
	stp	xzr, xzr, [x19, #8]
	ldr	w0, [x19, #4]
	cbz	w0, LBB0_7
; %bb.4:
	bl	_is_power_of_2
	ldr	w8, [x19, #4]
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w9, [x21]
	cmp	w9, w8, lsl #2
	b.ge	LBB0_11
; %bb.6:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_7:
	mov	w8, #0
LBB0_8:
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_pr_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x20
	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
LBB0_11:
	mov	x0, x19
	bl	_pearl_hhbm_init
	cbz	w0, LBB0_13
; %bb.12:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_19
LBB0_13:
	mov	x0, x19
	bl	_qtnf_pcie_alloc_skb_array
	cbz	w0, LBB0_15
; %bb.14:
	mov	x20, x0
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_19
LBB0_15:
	mov	x0, x19
	bl	_pearl_alloc_bd_table
	cbz	w0, LBB0_17
; %bb.16:
	mov	x20, x0
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_19
LBB0_17:
	mov	x0, x19
	bl	_pearl_alloc_rx_buffers
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.18:
Lloh19:
	adrp	x0, l_.str.6@PAGE
Lloh20:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_19:
	bl	_pr_err
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PEARL_TX_BD_SIZE_DEFAULT,8,3   ; @PEARL_TX_BD_SIZE_DEFAULT
	.comm	_PCIE_HHBM_MAX_SIZE,4,2         ; @PCIE_HHBM_MAX_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad tx_bd_size value %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"rx_bd_size_param %u is not power of two\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"rx_bd_size_param %u is too large\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to init h/w queues\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate skb array\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to allocate bd table\n"

l_.str.6:                               ; @.str.6
	.asciz	"failed to allocate rx buffers\n"

	.no_dead_strip	_qtnf_pcie_pearl_init_xfer
.subsections_via_symbols
