	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_setup_pf_mbox
_cn23xx_setup_pf_mbox:                  ## @cn23xx_setup_pf_mbox
	.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
	cmpq	$0, 24(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	movl	40(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	44(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %r13
	movl	$72, %edi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	imulq	%r14, %r13
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	leaq	64(%rbx), %rdi
	callq	_spin_lock_init
	movq	%r12, 56(%rbx)
	movq	%r13, (%rbx)
	movq	_OCTEON_MBOX_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	16(%r12), %rax
	movq	(%rax), %r15
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_CN23XX_SLI_MAC_PF_MBOX_INT
	cltq
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 40(%rbx)
	movq	16(%r12), %rax
	movq	(%rax), %r15
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_CN23XX_SLI_PKT_PF_VF_MBOX_SIG
	cltq
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 32(%rbx)
	movq	16(%r12), %rax
	movq	(%rax), %r15
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_CN23XX_SLI_PKT_PF_VF_MBOX_SIG
	cltq
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 24(%rbx)
	movq	%rbx, %rdi
	addq	$8, %rdi
	movq	_cn23xx_pf_mbox_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%rbx, 16(%rbx)
	movq	8(%r12), %rax
	movq	%rbx, (%rax,%r13,8)
	movq	_OCTEON_PFVFSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %rsi
	callq	_writeq
	incq	%r14
	cmpq	24(%r12), %r14
	jb	LBB0_3
## %bb.7:
	movq	(%r12), %rax
	movq	_OCTEON_CN23XX_REV_1_1@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jge	LBB0_9
## %bb.8:
	movq	8(%r12), %rax
	movq	(%rax), %r14
	addq	$8, %r14
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_schedule_delayed_work
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	$1, %ebx
	testq	%r14, %r14
	je	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	-8(%rax,%r14,8), %rdi
	callq	_vfree
	decq	%r14
	jne	LBB0_5
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTEON_MBOX_STATE_IDLE,4,2     ## @OCTEON_MBOX_STATE_IDLE
	.comm	_cn23xx_pf_mbox_thread,4,2      ## @cn23xx_pf_mbox_thread
	.comm	_OCTEON_PFVFSIG,4,2             ## @OCTEON_PFVFSIG
	.comm	_OCTEON_CN23XX_REV_1_1,8,3      ## @OCTEON_CN23XX_REV_1_1
	.no_dead_strip	_cn23xx_setup_pf_mbox
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_setup_pf_mbox
_cn23xx_setup_pf_mbox:                  ; @cn23xx_setup_pf_mbox
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x24, #0
	ldp	w21, w20, [x0, #40]
Lloh0:
	adrp	x25, _OCTEON_MBOX_STATE_IDLE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _OCTEON_MBOX_STATE_IDLE@GOTPAGEOFF]
Lloh2:
	adrp	x26, _cn23xx_pf_mbox_thread@GOTPAGE
Lloh3:
	ldr	x26, [x26, _cn23xx_pf_mbox_thread@GOTPAGEOFF]
Lloh4:
	adrp	x27, _OCTEON_PFVFSIG@GOTPAGE
Lloh5:
	ldr	x27, [x27, _OCTEON_PFVFSIG@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19, #32]
	mov	w0, #72
	bl	_vmalloc
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	mul	x23, x23, x24
	mov	w1, #0
	mov	w2, #72
	bl	_memset
	add	x0, x22, #64
	bl	_spin_lock_init
	str	x19, [x22, #56]
	str	x23, [x22]
	ldr	w8, [x25]
	str	w8, [x22, #48]
	ldr	x8, [x19, #16]
	ldr	x28, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_CN23XX_SLI_MAC_PF_MBOX_INT
	add	x8, x28, w0, sxtw #2
	str	x8, [x22, #40]
	ldr	x8, [x19, #16]
	ldr	x28, [x8]
	mov	x0, x23
	mov	w1, #0
	bl	_CN23XX_SLI_PKT_PF_VF_MBOX_SIG
	add	x8, x28, w0, sxtw #2
	str	x8, [x22, #32]
	ldr	x8, [x19, #16]
	ldr	x28, [x8]
	mov	x0, x23
	mov	w1, #1
	bl	_CN23XX_SLI_PKT_PF_VF_MBOX_SIG
	add	x8, x28, w0, sxtw #2
	str	x8, [x22, #24]
	add	x0, x22, #8
	ldr	w1, [x26]
	bl	_INIT_DELAYED_WORK
	str	x22, [x22, #16]
	ldr	x8, [x19, #8]
	str	x22, [x8, x23, lsl #3]
	ldr	w0, [x27]
	ldr	x1, [x22, #24]
	bl	_writeq
	add	x24, x24, #1
	ldr	x8, [x19, #24]
	cmp	x24, x8
	b.lo	LBB0_2
; %bb.4:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _OCTEON_CN23XX_REV_1_1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OCTEON_CN23XX_REV_1_1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x19, x8, #8
	mov	w0, #0
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	bl	_schedule_delayed_work
LBB0_6:
	mov	w0, #0
	b	LBB0_11
LBB0_7:
	cbz	x24, LBB0_10
; %bb.8:
	sub	x20, x24, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x20, lsl #3]
	bl	_vfree
	sub	x20, x20, #1
	cmn	x20, #1
	b.ne	LBB0_9
LBB0_10:
	mov	w0, #1
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTEON_MBOX_STATE_IDLE,4,2     ; @OCTEON_MBOX_STATE_IDLE
	.comm	_cn23xx_pf_mbox_thread,4,2      ; @cn23xx_pf_mbox_thread
	.comm	_OCTEON_PFVFSIG,4,2             ; @OCTEON_PFVFSIG
	.comm	_OCTEON_CN23XX_REV_1_1,8,3      ; @OCTEON_CN23XX_REV_1_1
	.no_dead_strip	_cn23xx_setup_pf_mbox
.subsections_via_symbols
