	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_core_drv_init           ## -- Begin function octeon_core_drv_init
	.p2align	4, 0x90
_octeon_core_drv_init:                  ## @octeon_core_drv_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r14
	movq	%rsi, %rdi
	callq	_OCTEON_CN6XXX
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_cn6xxx@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	%r13, %rdi
	callq	_OCTEON_CN23XX_PF
	testq	%rax, %rax
	je	LBB0_28
## %bb.3:
	movq	_cn23xx_pf@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_CHIP_CONF
	movl	%eax, %edi
	callq	_CFG_GET_NUM_NIC_PORTS
	movq	%rax, %r12
LBB0_5:
	leaq	48(%r13), %r15
	movq	%r15, %rdi
	callq	_atomic_read
	movq	_OCT_DEV_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.7:
	movq	24(%r14), %rdi
	callq	_get_oct_app_string
	leaq	-64(%rbp), %rdi
	movl	%eax, %esi
	movl	$15, %edx
	callq	_strncpy
	movq	24(%r14), %rax
	movq	%rax, 112(%r13)
	movq	_CVM_DRV_NIC_APP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	48(%r14), %rcx
	movq	%rcx, 80(%r13)
	movq	40(%r14), %rdx
	movq	%rdx, 104(%r13)
	cmpq	%r12, %rcx
	jl	LBB0_11
LBB0_12:
	movl	36(%r14), %ecx
	movl	%ecx, 96(%r13)
	movq	%rax, 88(%r13)
	movq	%rax, 64(%r13)
	movl	32(%r14), %eax
	movl	%eax, 56(%r13)
	movq	(%r13), %rsi
	testq	%rsi, %rsi
	jle	LBB0_20
## %bb.13:
	movq	72(%r13), %rdx
	leaq	-1(%rsi), %rdi
	movl	%esi, %ecx
	andl	$7, %ecx
	cmpq	$7, %rdi
	jae	LBB0_15
## %bb.14:
	xorl	%edi, %edi
	jmp	LBB0_17
LBB0_6:
	movq	16(%r13), %r12
	movq	%r15, %rdi
	callq	_atomic_read
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	cmpq	$0, 8(%r14)
	jg	LBB0_24
	jmp	LBB0_26
LBB0_8:
	movq	80(%r13), %rcx
	cmpq	%r12, %rcx
	jge	LBB0_12
LBB0_11:
	movq	16(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	cmpq	$0, 8(%r14)
	jg	LBB0_24
	jmp	LBB0_26
LBB0_28:
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_15:
	andq	$-8, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	8(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	16(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	24(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	32(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	40(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	48(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	movq	56(%rdx,%rdi,8), %rbx
	movl	%eax, (%rbx)
	addq	$8, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_16
LBB0_17:
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.18:
	leaq	(%rdx,%rdi,8), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rdi
	movl	%eax, (%rdi)
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_19
LBB0_20:
	movq	_OCT_DEV_CORE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_atomic_set
	movq	_core_setup@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	8(%r13), %rax
	leaq	(%rax,%rax,4), %rbx
	leaq	(%r12,%rbx,4), %r15
	movq	(%r14), %rax
	movq	(%rax), %rcx
	movq	_OCT_DROQ_INFO_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$20, %rax
	cmpq	%rax, %rcx
	je	LBB0_22
## %bb.21:
	movq	16(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	$20, %edx
	callq	_dev_dbg
LBB0_22:
	movq	16(%r14), %rax
	movl	(%rax), %edi
	callq	_get_rbd
	movq	_OCT_DROQ_INFO_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	$20, %edx
	callq	_memcpy
	movq	24(%r13), %rdi
	movl	16(%r12,%rbx,4), %esi
	movq	_OCT_BOARD_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strncpy
	movq	32(%r13), %rdi
	movl	12(%r12,%rbx,4), %esi
	movq	_OCT_SERIAL_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strncpy
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_octeon_swap_8B_data
	movl	8(%r12,%rbx,4), %eax
	movl	%eax, 44(%r13)
	movl	4(%r12,%rbx,4), %eax
	movl	%eax, 40(%r13)
	movq	16(%r13), %r12
	movl	(%r15), %edi
	callq	_CVM_CAST64
	leaq	L_.str.3(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	%eax, %ecx
	callq	_dev_info
	cmpq	$0, 8(%r14)
	jle	LBB0_26
LBB0_24:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_recv_buffer_free
	incq	%rbx
	cmpq	8(%r14), %rbx
	jl	LBB0_25
LBB0_26:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_octeon_free_recv_info
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.27:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_cn6xxx,4,2                     ## @cn6xxx
	.comm	_cn23xx_pf,4,2                  ## @cn23xx_pf
	.comm	_OCT_DEV_RUNNING,8,3            ## @OCT_DEV_RUNNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received CORE OK when device state is 0x%x\n"

	.comm	_CVM_DRV_NIC_APP,8,3            ## @CVM_DRV_NIC_APP
L_.str.1:                               ## @.str.1
	.asciz	"Config has more ports than firmware allows (%d > %d).\n"

	.comm	_OCT_DEV_CORE_OK,4,2            ## @OCT_DEV_CORE_OK
	.comm	_core_setup,8,3                 ## @core_setup
	.comm	_OCT_DROQ_INFO_SIZE,8,3         ## @OCT_DROQ_INFO_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Core setup bytes expected %u found %d\n"

	.comm	_OCT_BOARD_NAME,4,2             ## @OCT_BOARD_NAME
	.comm	_OCT_SERIAL_LEN,4,2             ## @OCT_SERIAL_LEN
L_.str.3:                               ## @.str.3
	.asciz	"Running %s (%llu Hz)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_core_drv_init           ; -- Begin function octeon_core_drv_init
	.p2align	2
_octeon_core_drv_init:                  ; @octeon_core_drv_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x23, [x0]
	mov	x0, x1
	bl	_OCTEON_CN6XXX
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _cn6xxx@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cn6xxx@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_OCTEON_CN23XX_PF
	cbz	x0, LBB0_14
; %bb.3:
Lloh5:
	adrp	x8, _cn23xx_pf@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cn23xx_pf@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_CHIP_CONF
	bl	_CFG_GET_NUM_NIC_PORTS
	mov	x22, x0
LBB0_5:
	add	x21, x20, #48
	mov	x0, x21
	bl	_atomic_read
Lloh7:
	adrp	x8, _OCT_DEV_RUNNING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OCT_DEV_RUNNING@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_11
; %bb.6:
	ldr	x0, [x23, #24]
	bl	_get_oct_app_string
	mov	x1, x0
	add	x0, sp, #8
	mov	w2, #15
	bl	_strncpy
	ldr	x8, [x23, #24]
	str	x8, [x20, #112]
Lloh10:
	adrp	x9, _CVM_DRV_NIC_APP@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CVM_DRV_NIC_APP@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.7:
	ldr	x9, [x23, #48]
	str	x9, [x20, #80]
	ldr	x10, [x23, #40]
	str	x10, [x20, #104]
	cmp	x9, x22
	b.lt	LBB0_13
LBB0_8:
	ldr	w9, [x23, #36]
	str	w9, [x20, #96]
	str	x8, [x20, #88]
	str	x8, [x20, #64]
	ldr	w8, [x23, #32]
	str	w8, [x20, #56]
	ldr	x9, [x20]
	cmp	x9, #1
	b.lt	LBB0_20
; %bb.9:
	ldr	x10, [x20, #72]
	cmp	x9, #4
	b.hs	LBB0_15
; %bb.10:
	mov	x11, #0
	b	LBB0_18
LBB0_11:
	ldr	x20, [x20, #16]
	mov	x0, x21
	bl	_atomic_read
	mov	x2, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_23
LBB0_12:
	ldr	x9, [x20, #80]
	cmp	x9, x22
	b.ge	LBB0_8
LBB0_13:
	ldr	x0, [x20, #16]
	str	x9, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	b	LBB0_23
LBB0_14:
	mov	x22, #0
	b	LBB0_5
LBB0_15:
	and	x11, x9, #0xfffffffffffffffc
	add	x12, x10, #16
	mov	x13, x11
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	x14, x15, [x12, #-16]
	ldp	x16, x17, [x12], #32
	str	w8, [x14]
	str	w8, [x15]
	str	w8, [x16]
	str	w8, [x17]
	subs	x13, x13, #4
	b.ne	LBB0_16
; %bb.17:
	cmp	x9, x11
	b.eq	LBB0_20
LBB0_18:
	sub	x9, x9, x11
	add	x10, x10, x11, lsl #3
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10], #8
	str	w8, [x11]
	subs	x9, x9, #1
	b.ne	LBB0_19
LBB0_20:
Lloh17:
	adrp	x8, _OCT_DEV_CORE_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OCT_DEV_CORE_OK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_atomic_set
Lloh20:
	adrp	x8, _core_setup@GOTPAGE
Lloh21:
	ldr	x8, [x8, _core_setup@GOTPAGEOFF]
Lloh22:
	ldr	x22, [x8]
	ldr	x24, [x20, #8]
	mov	w8, #20
	madd	x21, x24, x8, x22
	ldr	x8, [x23]
	ldr	x3, [x8]
Lloh23:
	adrp	x25, _OCT_DROQ_INFO_SIZE@GOTPAGE
Lloh24:
	ldr	x25, [x25, _OCT_DROQ_INFO_SIZE@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x8, x8, #20
	cmp	x3, x8
	b.eq	LBB0_22
; %bb.21:
	ldr	x0, [x20, #16]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #20
	bl	_dev_dbg
LBB0_22:
	ldr	x8, [x23, #16]
	ldr	w0, [x8]
	bl	_get_rbd
	ldr	x8, [x25]
	add	x1, x8, x0
	mov	w25, #20
	mov	x0, x21
	mov	w2, #20
	bl	_memcpy
	ldr	x0, [x20, #24]
	madd	x22, x24, x25, x22
	ldr	w1, [x22, #16]
Lloh27:
	adrp	x8, _OCT_BOARD_NAME@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OCT_BOARD_NAME@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	bl	_strncpy
	ldr	x0, [x20, #32]
	ldr	w1, [x22, #12]
Lloh30:
	adrp	x8, _OCT_SERIAL_LEN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _OCT_SERIAL_LEN@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	bl	_strncpy
	mov	x0, x21
	mov	w1, #2
	bl	_octeon_swap_8B_data
	ldur	d0, [x22, #4]
	str	d0, [x20, #40]
	ldr	x20, [x20, #16]
	ldr	w0, [x21]
	bl	_CVM_CAST64
	mov	x3, x0
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_dev_info
LBB0_23:
	ldr	x8, [x23, #8]
	cmp	x8, #1
	b.lt	LBB0_26
; %bb.24:
	mov	x20, #0
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_recv_buffer_free
	add	x20, x20, #1
	ldr	x8, [x23, #8]
	cmp	x20, x8
	b.lt	LBB0_25
LBB0_26:
	mov	x0, x19
	bl	_octeon_free_recv_info
	ldr	x8, [sp, #24]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_cn6xxx,4,2                     ; @cn6xxx
	.comm	_cn23xx_pf,4,2                  ; @cn23xx_pf
	.comm	_OCT_DEV_RUNNING,8,3            ; @OCT_DEV_RUNNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received CORE OK when device state is 0x%x\n"

	.comm	_CVM_DRV_NIC_APP,8,3            ; @CVM_DRV_NIC_APP
l_.str.1:                               ; @.str.1
	.asciz	"Config has more ports than firmware allows (%d > %d).\n"

	.comm	_OCT_DEV_CORE_OK,4,2            ; @OCT_DEV_CORE_OK
	.comm	_core_setup,8,3                 ; @core_setup
	.comm	_OCT_DROQ_INFO_SIZE,8,3         ; @OCT_DROQ_INFO_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Core setup bytes expected %u found %d\n"

	.comm	_OCT_BOARD_NAME,4,2             ; @OCT_BOARD_NAME
	.comm	_OCT_SERIAL_LEN,4,2             ; @OCT_SERIAL_LEN
l_.str.3:                               ; @.str.3
	.asciz	"Running %s (%llu Hz)\n"

.subsections_via_symbols
