	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_get_dev_attr        ## -- Begin function bnxt_qplib_get_dev_attr
	.p2align	4, 0x90
_bnxt_qplib_get_dev_attr:               ## @bnxt_qplib_get_dev_attr
	.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
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	_QUERY_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_RCFW_CMD_PREP
	movq	%r14, %rdi
	movl	$104, %esi
	callq	_bnxt_qplib_rcfw_alloc_sbuf
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	(%rax), %r12
	movq	_BNXT_QPLIB_CMDQE_UNITS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	cmpq	$104, %rcx
	ja	LBB0_3
## %bb.4:
	movl	$104, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_5
LBB0_1:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	callq	_bnxt_qplib_rcfw_send_message
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	96(%r12), %edi
	callq	_le32_to_cpu
	cmpl	$1, -48(%rbp)                   ## 4-byte Folded Reload
	adcl	$0, %eax
	movl	%eax, (%r13)
	movq	(%r12), %rax
	movq	_BNXT_QPLIB_MAX_OUT_RD_ATOM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovgeq	%rcx, %rax
	movq	%rax, 176(%r13)
	movq	8(%r12), %rax
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, 168(%r13)
	movl	92(%r12), %edi
	callq	_le16_to_cpu
	movq	_BNXT_QPLIB_RESERVED_QP_WRS@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, 160(%r13)
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_bnxt_qplib_is_chip_gen_p5
	movl	$6, %ecx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	16(%r12), %ecx
LBB0_8:
	movl	%ecx, 4(%r13)
	movl	88(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 152(%r13)
	movl	84(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 144(%r13)
	movl	4(%r13), %eax
	movl	%eax, 8(%r13)
	movl	80(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 136(%r13)
	movl	76(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 128(%r13)
	movl	72(%r12), %edi
	callq	_le64_to_cpu
	movl	%eax, 120(%r13)
	movl	$65536, 12(%r13)                ## imm = 0x10000
	movl	68(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 112(%r13)
	movl	64(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 104(%r13)
	movl	60(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 96(%r13)
	movl	56(%r12), %eax
	movl	%eax, 88(%r13)
	movl	52(%r12), %edi
	callq	_le16_to_cpu
	movq	%rax, 80(%r13)
	movl	48(%r12), %edi
	callq	_le32_to_cpu
	decq	%rax
	movq	%rax, 72(%r13)
	movl	44(%r12), %eax
	movl	%eax, 64(%r13)
	movl	40(%r12), %edi
	callq	_le32_to_cpu
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	movl	$65535, %ecx                    ## imm = 0xFFFF
	cmovll	%eax, %ecx
	movl	%ecx, 16(%r13)
	movl	36(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 56(%r13)
	movl	20(%r12), %eax
	incl	%eax
	movq	_RCFW_DBR_BASE_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, 20(%r13)
	movl	32(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 48(%r13)
	movl	40(%r13), %esi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_bnxt_qplib_query_version
	movq	_MAX_TQM_ALLOC_REQ@GOTPCREL(%rip), %r15
	cmpl	$4, (%r15)
	jl	LBB0_11
## %bb.9:
	movq	%r12, %rbx
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	movl	(%rax,%r14), %edi
	callq	_le32_to_cpu
	movq	32(%r13), %rcx
	movq	%rax, (%rcx,%r14,8)
	incq	%r12
	movl	(%r15), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	addq	$4, %r14
	cmpq	%rax, %r12
	jl	LBB0_10
LBB0_11:
	movl	$0, 24(%r13)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
LBB0_12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bnxt_qplib_rcfw_free_sbuf
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QUERY_FUNC,4,2                 ## @QUERY_FUNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SP: QUERY_FUNC alloc side buffer failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BNXT_QPLIB_CMDQE_UNITS,4,2     ## @BNXT_QPLIB_CMDQE_UNITS
	.comm	_BNXT_QPLIB_MAX_OUT_RD_ATOM,8,3 ## @BNXT_QPLIB_MAX_OUT_RD_ATOM
	.comm	_BNXT_QPLIB_RESERVED_QP_WRS,8,3 ## @BNXT_QPLIB_RESERVED_QP_WRS
	.comm	_RCFW_DBR_BASE_PAGE_SHIFT,4,2   ## @RCFW_DBR_BASE_PAGE_SHIFT
	.comm	_MAX_TQM_ALLOC_REQ,4,2          ## @MAX_TQM_ALLOC_REQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_get_dev_attr        ; -- Begin function bnxt_qplib_get_dev_attr
	.p2align	2
_bnxt_qplib_get_dev_attr:               ; @bnxt_qplib_get_dev_attr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _QUERY_FUNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QUERY_FUNC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, #0
	mov	w2, #0
	bl	_RCFW_CMD_PREP
	mov	x0, x19
	mov	w1, #104
	bl	_bnxt_qplib_rcfw_alloc_sbuf
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x24, [x0]
Lloh3:
	adrp	x8, _BNXT_QPLIB_CMDQE_UNITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNXT_QPLIB_CMDQE_UNITS@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	mov	w9, #104
	udiv	x8, x9, x8
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	mov	x3, x21
	mov	w4, #0
	bl	_bnxt_qplib_rcfw_send_message
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	w0, [x24, #96]
	bl	_le32_to_cpu
	cmp	w23, #0
	cinc	w8, w0, eq
	str	w8, [x20]
Lloh6:
	adrp	x8, _BNXT_QPLIB_MAX_OUT_RD_ATOM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BNXT_QPLIB_MAX_OUT_RD_ATOM@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldp	x9, x10, [x24]
	cmp	x9, x8
	csel	x9, x9, x8, lt
	cmp	x10, x8
	csel	x8, x10, x8, lt
	stp	x8, x9, [x20, #168]
	ldr	w0, [x24, #92]
	bl	_le16_to_cpu
Lloh9:
	adrp	x8, _BNXT_QPLIB_RESERVED_QP_WRS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BNXT_QPLIB_RESERVED_QP_WRS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	sub	x8, x0, x8
	str	x8, [x20, #160]
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_bnxt_qplib_is_chip_gen_p5
	cbz	x0, LBB0_5
; %bb.3:
	mov	w8, #6
	b	LBB0_6
LBB0_4:
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_5:
	ldr	w8, [x24, #16]
LBB0_6:
	str	w8, [x20, #4]
	ldr	w0, [x24, #88]
	bl	_le32_to_cpu
	str	x0, [x20, #152]
	ldr	w0, [x24, #84]
	bl	_le32_to_cpu
	str	x0, [x20, #144]
	ldr	w8, [x20, #4]
	str	w8, [x20, #8]
	ldr	w0, [x24, #80]
	bl	_le32_to_cpu
	str	x0, [x20, #136]
	ldr	w0, [x24, #76]
	bl	_le32_to_cpu
	str	x0, [x20, #128]
	ldr	w0, [x24, #72]
	bl	_le64_to_cpu
	str	w0, [x20, #120]
	mov	w8, #65536
	str	w8, [x20, #12]
	ldr	w0, [x24, #68]
	bl	_le32_to_cpu
	str	x0, [x20, #112]
	ldr	w0, [x24, #64]
	bl	_le32_to_cpu
	str	x0, [x20, #104]
	ldr	w0, [x24, #60]
	bl	_le32_to_cpu
	str	x0, [x20, #96]
	ldp	w0, w8, [x24, #52]
	str	w8, [x20, #88]
	bl	_le16_to_cpu
	str	x0, [x20, #80]
	ldr	w0, [x24, #48]
	bl	_le32_to_cpu
	sub	x8, x0, #1
	str	x8, [x20, #72]
	ldp	w0, w8, [x24, #40]
	str	w8, [x20, #64]
	bl	_le32_to_cpu
	mov	w8, #65535
	cmp	w0, w8
	csel	w8, w0, w8, lt
	str	w8, [x20, #16]
	ldr	w0, [x24, #36]
	bl	_le32_to_cpu
	str	x0, [x20, #56]
	ldr	w8, [x24, #20]
	add	w8, w8, #1
Lloh17:
	adrp	x9, _RCFW_DBR_BASE_PAGE_SHIFT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _RCFW_DBR_BASE_PAGE_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	str	w8, [x20, #20]
	ldr	w0, [x24, #32]
	bl	_le32_to_cpu
	str	x0, [x20, #48]
	ldr	w1, [x20, #40]
	mov	x0, x19
	bl	_bnxt_qplib_query_version
Lloh20:
	adrp	x23, _MAX_TQM_ALLOC_REQ@GOTPAGE
Lloh21:
	ldr	x23, [x23, _MAX_TQM_ALLOC_REQ@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #4
	b.lt	LBB0_9
; %bb.7:
	mov	x25, #0
	mov	x26, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #24]
	ldr	w0, [x8, x25]
	bl	_le32_to_cpu
	ldr	x8, [x20, #32]
	str	x0, [x8, x25, lsl #3]
	add	x26, x26, #1
	ldr	w8, [x23]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	add	x25, x25, #4
	cmp	x26, w8, sxtw
	b.lt	LBB0_8
LBB0_9:
	str	wzr, [x20, #24]
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_bnxt_qplib_rcfw_free_sbuf
LBB0_11:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_QUERY_FUNC,4,2                 ; @QUERY_FUNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SP: QUERY_FUNC alloc side buffer failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BNXT_QPLIB_CMDQE_UNITS,4,2     ; @BNXT_QPLIB_CMDQE_UNITS
	.comm	_BNXT_QPLIB_MAX_OUT_RD_ATOM,8,3 ; @BNXT_QPLIB_MAX_OUT_RD_ATOM
	.comm	_BNXT_QPLIB_RESERVED_QP_WRS,8,3 ; @BNXT_QPLIB_RESERVED_QP_WRS
	.comm	_RCFW_DBR_BASE_PAGE_SHIFT,4,2   ; @RCFW_DBR_BASE_PAGE_SHIFT
	.comm	_MAX_TQM_ALLOC_REQ,4,2          ; @MAX_TQM_ALLOC_REQ
.subsections_via_symbols
