	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_hwrm_vnic_set_tpa
_bnxt_hwrm_vnic_set_tpa:                ## @bnxt_hwrm_vnic_set_tpa
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	24(%rdi), %r15
	movq	_VNIC_TPA_CFG_REQ_MAX_AGGS_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	$0, -64(%rbp)
	movq	(%r15,%rsi,8), %rcx
	movq	_INVALID_HW_RING_ID@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_18
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_HWRM_VNIC_TPA_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-112(%rbp), %rsi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_hwrm_cmd_hdr_init
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.2:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_VNIC_TPA_CFG_REQ_FLAGS_TPA@GOTPCREL(%rip), %rax
	movq	_VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	16(%r12), %rax
	movq	_VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	movq	(%rax), %r13
	movq	_VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	addq	$-40, %r13
	movq	_BNXT_FLAG_GRO@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	je	LBB0_4
## %bb.3:
	movq	_VNIC_TPA_CFG_REQ_FLAGS_GRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	orl	%ebx, %edi
	callq	_cpu_to_le32
	movq	_VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS@GOTPCREL(%rip), %rcx
	movq	_VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	orl	(%rcx), %edi
	movq	%rax, -72(%rbp)
	movq	_VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -80(%rbp)
	movq	_BNXT_RX_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %r13
	jbe	LBB0_5
## %bb.9:
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_10
## %bb.11:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rsi
	jmp	LBB0_12
LBB0_5:
	movq	%rcx, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_6
## %bb.7:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%r13
	movq	%rax, %rcx
	jmp	LBB0_8
LBB0_10:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %esi
LBB0_12:
	decq	%rcx
	andq	%r13, %rcx
	cmpq	$1, %rcx
	sbbl	$-1, %esi
	movq	_MAX_SKB_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%esi, %eax
	cltd
	idivl	%esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_6:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %ecx
LBB0_8:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	_MAX_SKB_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	imull	%ecx, %eax
LBB0_13:
	movq	_BNXT_FLAG_CHIP_P5@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12)
	je	LBB0_15
## %bb.14:
	movq	_MAX_TPA_SEGS_P5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rbx
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %edi
	callq	_ilog2
LBB0_16:
	movslq	%eax, %rdi
	callq	_cpu_to_le16
	movq	%rax, -88(%rbp)
	movq	%rbx, %rdi
	callq	_cpu_to_le16
	movq	%rax, -96(%rbp)
	movl	$512, %edi                      ## imm = 0x200
	callq	_cpu_to_le32
	movq	%rax, -104(%rbp)
LBB0_17:
	movq	(%r15,%r14,8), %rdi
	callq	_cpu_to_le16
	movq	%rax, -112(%rbp)
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-112(%rbp), %rsi
	movq	%r12, %rdi
	movl	$56, %edx
	callq	_hwrm_send_message
LBB0_18:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VNIC_TPA_CFG_REQ_MAX_AGGS_MAX,8,3 ## @VNIC_TPA_CFG_REQ_MAX_AGGS_MAX
	.comm	_INVALID_HW_RING_ID,8,3         ## @INVALID_HW_RING_ID
	.comm	_HWRM_VNIC_TPA_CFG,4,2          ## @HWRM_VNIC_TPA_CFG
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_TPA,4,2 ## @VNIC_TPA_CFG_REQ_FLAGS_TPA
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA,4,2 ## @VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE,4,2 ## @VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN,4,2 ## @VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ,4,2 ## @VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ
	.comm	_BNXT_FLAG_GRO,4,2              ## @BNXT_FLAG_GRO
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_GRO,4,2 ## @VNIC_TPA_CFG_REQ_FLAGS_GRO
	.comm	_VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS,4,2 ## @VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS
	.comm	_VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS,4,2 ## @VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS
	.comm	_VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN,4,2 ## @VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN
	.comm	_BNXT_RX_PAGE_SIZE,8,3          ## @BNXT_RX_PAGE_SIZE
	.comm	_MAX_SKB_FRAGS,4,2              ## @MAX_SKB_FRAGS
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ## @BNXT_FLAG_CHIP_P5
	.comm	_MAX_TPA_SEGS_P5,4,2            ## @MAX_TPA_SEGS_P5
	.comm	_HWRM_CMD_TIMEOUT,4,2           ## @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_hwrm_vnic_set_tpa
.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_set_tpa
_bnxt_hwrm_vnic_set_tpa:                ; @bnxt_hwrm_vnic_set_tpa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x23, [x0, #24]
Lloh0:
	adrp	x8, _VNIC_TPA_CFG_REQ_MAX_AGGS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VNIC_TPA_CFG_REQ_MAX_AGGS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	str	xzr, [sp, #48]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	str	q0, [sp]
	ldr	x8, [x23, x1, lsl #3]
Lloh3:
	adrp	x9, _INVALID_HW_RING_ID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INVALID_HW_RING_ID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_11
LBB0_2:
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh6:
	adrp	x8, _HWRM_VNIC_TPA_CFG@GOTPAGE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	x9, [x9, _BNXT_FLAG_GRO@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _VNIC_TPA_CFG_REQ_FLAGS_GRO@GOTPAGE
Lloh28:
	ldr	x10, [x10, _VNIC_TPA_CFG_REQ_FLAGS_GRO@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	tst	w9, w22
	csel	w9, wzr, w10, eq
	orr	w0, w8, w9
	bl	_cpu_to_le32
	str	x0, [sp, #40]
Lloh30:
	adrp	x8, _VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS@GOTPAGE
Lloh34:
	ldr	x9, [x9, _VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh36:
	adrp	x9, _VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN@GOTPAGE
Lloh37:
	ldr	x9, [x9, _VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_le32
	str	x0, [sp, #32]
Lloh39:
	adrp	x8, _BNXT_RX_PAGE_SIZE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BNXT_RX_PAGE_SIZE@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cmp	x24, x8
	b.ls	LBB0_5
; %bb.4:
	udiv	x9, x24, x8
	sub	x8, x8, #1
	tst	x8, x24
	cinc	w8, w9, ne
Lloh42:
	adrp	x9, _MAX_SKB_FRAGS@GOTPAGE
Lloh43:
	ldr	x9, [x9, _MAX_SKB_FRAGS@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	sub	w9, w9, w8
	sdiv	w0, w9, w8
	b	LBB0_6
LBB0_5:
	udiv	x8, x8, x24
Lloh45:
	adrp	x9, _MAX_SKB_FRAGS@GOTPAGE
Lloh46:
	ldr	x9, [x9, _MAX_SKB_FRAGS@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	sub	w9, w9, #1
	mul	w0, w9, w8
LBB0_6:
	ldr	w8, [x19]
Lloh48:
	adrp	x9, _BNXT_FLAG_CHIP_P5@GOTPAGE
Lloh49:
	ldr	x9, [x9, _BNXT_FLAG_CHIP_P5@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh51:
	adrp	x8, _MAX_TPA_SEGS_P5@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MAX_TPA_SEGS_P5@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	ldr	x21, [x19, #8]
	b	LBB0_9
LBB0_8:
	bl	_ilog2
                                        ; kill: def $w0 killed $w0 def $x0
LBB0_9:
	sxtw	x0, w0
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	mov	x0, x21
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	mov	w0, #512
	bl	_cpu_to_le32
	str	x0, [sp, #8]
LBB0_10:
	ldr	x0, [x23, x20, lsl #3]
	bl	_cpu_to_le16
	str	x0, [sp]
Lloh54:
	adrp	x8, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh55:
	ldr	x8, [x8, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh56:
	ldr	w3, [x8]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #56
	bl	_hwrm_send_message
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_VNIC_TPA_CFG_REQ_MAX_AGGS_MAX,8,3 ; @VNIC_TPA_CFG_REQ_MAX_AGGS_MAX
	.comm	_INVALID_HW_RING_ID,8,3         ; @INVALID_HW_RING_ID
	.comm	_HWRM_VNIC_TPA_CFG,4,2          ; @HWRM_VNIC_TPA_CFG
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_TPA,4,2 ; @VNIC_TPA_CFG_REQ_FLAGS_TPA
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA,4,2 ; @VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE,4,2 ; @VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN,4,2 ; @VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ,4,2 ; @VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ
	.comm	_BNXT_FLAG_GRO,4,2              ; @BNXT_FLAG_GRO
	.comm	_VNIC_TPA_CFG_REQ_FLAGS_GRO,4,2 ; @VNIC_TPA_CFG_REQ_FLAGS_GRO
	.comm	_VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS,4,2 ; @VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS
	.comm	_VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS,4,2 ; @VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS
	.comm	_VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN,4,2 ; @VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN
	.comm	_BNXT_RX_PAGE_SIZE,8,3          ; @BNXT_RX_PAGE_SIZE
	.comm	_MAX_SKB_FRAGS,4,2              ; @MAX_SKB_FRAGS
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ; @BNXT_FLAG_CHIP_P5
	.comm	_MAX_TPA_SEGS_P5,4,2            ; @MAX_TPA_SEGS_P5
	.comm	_HWRM_CMD_TIMEOUT,4,2           ; @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_hwrm_vnic_set_tpa
.subsections_via_symbols
