	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_setup_instr_queues      ## -- Begin function octeon_setup_instr_queues
	.p2align	4, 0x90
_octeon_setup_instr_queues:             ## @octeon_setup_instr_queues
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rdi
	callq	_dev_to_node
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_OCTEON_CN6XXX
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_cn6xxx@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	%rbx, %rdi
	callq	_OCTEON_CN23XX_PF
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_cn23xx_pf@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_OCTEON_CN23XX_VF
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	_cn23xx_vf@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_CHIP_CONF
	movl	%eax, %edi
	callq	_CFG_GET_NUM_DEF_TX_DESCS
	movl	%eax, %r14d
LBB0_7:
	movq	$0, (%rbx)
	movl	$24, %edi
	movl	%r15d, %esi
	callq	_vzalloc_node
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.8:
	movl	$4, %edi
	callq	_vzalloc
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
LBB0_9:
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rcx)
	movq	(%rax), %rax
	movq	$0, (%rax)
	movl	$0, -28(%rbp)
	movl	16(%rbx), %eax
	movl	%eax, -32(%rbp)
	movaps	%xmm0, -48(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, 16(%rsp)
	movaps	-48(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_octeon_init_instr_queue
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	callq	_vfree
	movq	8(%rbx), %rax
	movq	$0, (%rax)
LBB0_12:
	movl	$1, %r15d
	jmp	LBB0_13
LBB0_11:
	incq	(%rbx)
LBB0_13:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_cn6xxx,4,2                     ## @cn6xxx
	.comm	_cn23xx_pf,4,2                  ## @cn23xx_pf
	.comm	_cn23xx_vf,4,2                  ## @cn23xx_vf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_setup_instr_queues      ; -- Begin function octeon_setup_instr_queues
	.p2align	2
_octeon_setup_instr_queues:             ; @octeon_setup_instr_queues
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x0, [x0, #24]
	bl	_dev_to_node
	mov	x20, x0
	mov	x0, x19
	bl	_OCTEON_CN6XXX
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _cn6xxx@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cn6xxx@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_OCTEON_CN23XX_PF
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _cn23xx_pf@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cn23xx_pf@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_OCTEON_CN23XX_VF
	cbz	x0, LBB0_14
; %bb.5:
Lloh4:
	adrp	x8, _cn23xx_vf@GOTPAGE
Lloh5:
	ldr	x8, [x8, _cn23xx_vf@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CHIP_CONF
	bl	_CFG_GET_NUM_DEF_TX_DESCS
	mov	x21, x0
LBB0_7:
	str	xzr, [x19]
	mov	w0, #24
	mov	x1, x20
	bl	_vzalloc_node
	ldr	x8, [x19, #8]
	str	x0, [x8]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbnz	x0, LBB0_9
; %bb.8:
	mov	w0, #4
	bl	_vzalloc
	ldr	x8, [x19, #8]
	str	x0, [x8]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_11
LBB0_9:
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	stp	xzr, xzr, [x9, #8]
	ldr	x8, [x8]
	str	xzr, [x8]
	ldr	w8, [x19, #16]
	stp	xzr, xzr, [sp, #8]
	stp	w8, wzr, [sp, #24]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_octeon_init_instr_queue
	cbz	x0, LBB0_12
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_vfree
	ldr	x8, [x19, #8]
	str	xzr, [x8]
LBB0_11:
	mov	w0, #1
	b	LBB0_13
LBB0_12:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
LBB0_13:
	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
	add	sp, sp, #80
	ret
LBB0_14:
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_cn6xxx,4,2                     ; @cn6xxx
	.comm	_cn23xx_pf,4,2                  ; @cn23xx_pf
	.comm	_cn23xx_vf,4,2                  ; @cn23xx_vf
.subsections_via_symbols
