	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_hwrm_vnic_alloc
_bnxt_hwrm_vnic_alloc:                  ## @bnxt_hwrm_vnic_alloc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	movq	32(%rdi), %r13
	movq	40(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_BNXT_FLAG_CHIP_P5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_6
## %bb.1:
	leal	(%rcx,%rdx), %eax
	cmpl	%edx, %eax
	jbe	LBB0_6
## %bb.2:
	movl	%ecx, %ecx
	movq	8(%r15), %r9
	leaq	(%r14,%r14,2), %rsi
	leaq	(,%rsi,8), %rsi
	addq	%r13, %rsi
	movl	%edx, %edi
	shlq	$3, %rdi
	addq	24(%r15), %rdi
	xorl	%edx, %edx
	movq	_INVALID_HW_RING_ID@GOTPCREL(%rip), %r8
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rdx,8), %rbx
	movl	(%rbx), %ebx
	movq	(%r9,%rbx,8), %rbx
	cmpq	(%r8), %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rsi), %rax
	movq	%rbx, (%rax,%rdx,8)
	incq	%rdx
	cmpl	%edx, %ecx
	jne	LBB0_3
	jmp	LBB0_6
LBB0_5:
	movl	16(%r15), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_netdev_err
LBB0_6:
	movq	_BNXT_MAX_CTX_PER_VNIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_24
## %bb.7:
	leaq	(%r14,%r14,2), %rcx
	movq	16(%r13,%rcx,8), %rcx
	cmpl	$4, %eax
	jb	LBB0_8
## %bb.9:
	movq	_INVALID_HW_RING_ID@GOTPCREL(%rip), %r8
	leaq	8(%r8), %rdx
	cmpq	%rdx, %rcx
	jae	LBB0_12
## %bb.10:
	leaq	(%rcx,%rax,8), %rdx
	cmpq	_INVALID_HW_RING_ID@GOTPCREL(%rip), %rdx
	jbe	LBB0_12
LBB0_8:
	xorl	%edx, %edx
LBB0_18:
	movq	%rdx, %r8
	notq	%r8
	addq	%rax, %r8
	movq	%rax, %rdi
	andq	$3, %rdi
	je	LBB0_21
## %bb.19:
	movq	_INVALID_HW_RING_ID@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	movq	%rsi, (%rcx,%rdx,8)
	incq	%rdx
	decq	%rdi
	jne	LBB0_20
LBB0_21:
	cmpq	$3, %r8
	jb	LBB0_24
## %bb.22:
	movq	_INVALID_HW_RING_ID@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	movq	%rdi, (%rcx,%rdx,8)
	movq	(%rsi), %rdi
	movq	%rdi, 8(%rcx,%rdx,8)
	movq	(%rsi), %rdi
	movq	%rdi, 16(%rcx,%rdx,8)
	movq	(%rsi), %rdi
	movq	%rdi, 24(%rcx,%rdx,8)
	addq	$4, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_23
	jmp	LBB0_24
LBB0_12:
	movl	%eax, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rdi
	movq	%rdi, %rsi
	shrq	$2, %rsi
	incq	%rsi
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.13:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	movq	(%r8), %xmm0                    ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rcx,%rbx,8)
	movdqu	%xmm0, 16(%rcx,%rbx,8)
	movdqu	%xmm0, 32(%rcx,%rbx,8)
	movdqu	%xmm0, 48(%rcx,%rbx,8)
	addq	$8, %rbx
	addq	$-2, %rdi
	jne	LBB0_14
## %bb.15:
	testb	$1, %sil
	je	LBB0_17
LBB0_16:
	movq	(%r8), %xmm0                    ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movdqu	%xmm0, (%rcx,%rbx,8)
	movdqu	%xmm0, 16(%rcx,%rbx,8)
LBB0_17:
	cmpq	%rax, %rdx
	jne	LBB0_18
LBB0_24:
	testq	%r14, %r14
	jne	LBB0_26
## %bb.25:
	movq	_VNIC_ALLOC_REQ_FLAGS_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, -48(%rbp)
LBB0_26:
	movq	_HWRM_VNIC_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_hwrm_cmd_hdr_init
	leaq	4(%r15), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	__hwrm_send_message
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
## %bb.27:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_le32_to_cpu
	leaq	(%r14,%r14,2), %rcx
	movl	%eax, 8(%r13,%rcx,8)
LBB0_28:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	xorl	%ebx, %ebx
	testb	$1, %sil
	jne	LBB0_16
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ## @BNXT_FLAG_CHIP_P5
	.comm	_INVALID_HW_RING_ID,8,3         ## @INVALID_HW_RING_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough ring groups avail:%x req:%x\n"

	.comm	_BNXT_MAX_CTX_PER_VNIC,4,2      ## @BNXT_MAX_CTX_PER_VNIC
	.comm	_VNIC_ALLOC_REQ_FLAGS_DEFAULT,4,2 ## @VNIC_ALLOC_REQ_FLAGS_DEFAULT
	.comm	_HWRM_VNIC_ALLOC,4,2            ## @HWRM_VNIC_ALLOC
	.comm	_HWRM_CMD_TIMEOUT,4,2           ## @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_hwrm_vnic_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_hwrm_vnic_alloc
_bnxt_hwrm_vnic_alloc:                  ; @bnxt_hwrm_vnic_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	add	w9, w3, w2
	str	xzr, [sp, #8]
	ldp	x22, x23, [x0, #32]
	ldr	w10, [x0]
Lloh0:
	adrp	x11, _BNXT_FLAG_CHIP_P5@GOTPAGE
Lloh1:
	ldr	x11, [x11, _BNXT_FLAG_CHIP_P5@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	and	w10, w11, w10
	cmp	w10, #0
	ccmp	w9, w2, #0, eq
Lloh3:
	adrp	x21, _INVALID_HW_RING_ID@GOTPAGE
Lloh4:
	ldr	x21, [x21, _INVALID_HW_RING_ID@GOTPAGEOFF]
	b.ls	LBB0_5
; %bb.1:
	mov	x8, x2
	mov	x2, #0
	mov	w3, w3
	ldr	x11, [x20, #24]
	ldr	x9, [x20, #8]
	mov	w10, #24
	madd	x10, x19, x10, x22
	add	x8, x11, w8, uxtw #3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8, x2, lsl #3]
	ldr	w11, [x11]
	ldr	x11, [x9, x11, lsl #3]
	ldr	x12, [x21]
	cmp	x11, x12
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x12, [x10]
	str	x11, [x12, x2, lsl #3]
	add	x2, x2, #1
	cmp	w3, w2
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_netdev_err
LBB0_5:
Lloh7:
	adrp	x8, _BNXT_MAX_CTX_PER_VNIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BNXT_MAX_CTX_PER_VNIC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.6:
	mov	w9, #24
	madd	x9, x19, x9, x22
	ldr	x9, [x9, #16]
	cmp	w8, #8
	b.lo	LBB0_11
; %bb.7:
	add	x10, x9, x8, lsl #3
	add	x11, x21, #8
	cmp	x9, x11
	ccmp	x10, x21, #0, lo
	b.hi	LBB0_11
; %bb.8:
	and	x10, x8, #0xfffffff8
	ld1r.2d	{ v0 }, [x21]
	add	x11, x9, #32
	mov	x12, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x21]
	dup.2d	v1, v1[0]
	stp	q0, q0, [x11, #-32]
	stp	q0, q1, [x11], #64
	subs	x12, x12, #8
	b.ne	LBB0_9
; %bb.10:
	cmp	x10, x8
	b.ne	LBB0_12
	b	LBB0_14
LBB0_11:
	mov	x10, #0
LBB0_12:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21]
	str	x10, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_13
LBB0_14:
	cbnz	x19, LBB0_16
; %bb.15:
Lloh10:
	adrp	x8, _VNIC_ALLOC_REQ_FLAGS_DEFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VNIC_ALLOC_REQ_FLAGS_DEFAULT@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	w0, [sp, #8]
LBB0_16:
Lloh13:
	adrp	x8, _HWRM_VNIC_ALLOC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HWRM_VNIC_ALLOC@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	mov	w3, #-1
	mov	w4, #-1
	bl	_bnxt_hwrm_cmd_hdr_init
	add	x21, x20, #4
	mov	x0, x21
	bl	_mutex_lock
Lloh16:
	adrp	x8, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #8
	bl	__hwrm_send_message
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.17:
	ldr	w0, [x23]
	bl	_le32_to_cpu
	mov	w8, #24
	madd	x8, x19, x8, x22
	str	w0, [x8, #8]
LBB0_18:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x20
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ; @BNXT_FLAG_CHIP_P5
	.comm	_INVALID_HW_RING_ID,8,3         ; @INVALID_HW_RING_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough ring groups avail:%x req:%x\n"

	.comm	_BNXT_MAX_CTX_PER_VNIC,4,2      ; @BNXT_MAX_CTX_PER_VNIC
	.comm	_VNIC_ALLOC_REQ_FLAGS_DEFAULT,4,2 ; @VNIC_ALLOC_REQ_FLAGS_DEFAULT
	.comm	_HWRM_VNIC_ALLOC,4,2            ; @HWRM_VNIC_ALLOC
	.comm	_HWRM_CMD_TIMEOUT,4,2           ; @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_hwrm_vnic_alloc
.subsections_via_symbols
