	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_add_pkey            ## -- Begin function bnxt_qplib_add_pkey
	.p2align	4, 0x90
_bnxt_qplib_add_pkey:                   ## @bnxt_qplib_add_pkey
	.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
	movq	%rdi, %rax
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movl	4(%rsi), %r13d
	cmpl	%r13d, (%rsi)
	jne	LBB0_3
## %bb.7:
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_1:
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_3:
	testl	%r13d, %r13d
	jle	LBB0_14
## %bb.4:
	movq	%rdx, %r14
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rdi
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	addq	$4, %rbx
	movl	%ecx, %r13d
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rdi
	movslq	4(%r12), %rax
	movl	%r13d, %ecx
	xorl	%eax, %ecx
	orl	(%rdi,%rbx), %ecx
	movl	%r15d, %ecx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, %ecx
	jmp	LBB0_12
LBB0_13:
	cmpl	%eax, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_15
LBB0_14:
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EALREADY@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_15:
	movslq	%ecx, %rax
	leaq	(%rdi,%rax,4), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	incl	(%r12)
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PKEY table not allocated\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"PKEY table is full\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EALREADY,4,2                   ## @EALREADY
L_.str.2:                               ## @.str.2
	.asciz	"PKEY table is FULL but count is not MAX??\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_add_pkey            ; -- Begin function bnxt_qplib_add_pkey
	.p2align	2
_bnxt_qplib_add_pkey:                   ; @bnxt_qplib_add_pkey
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	cbz	x1, LBB0_3
; %bb.1:
	mov	x19, x1
	ldp	w8, w22, [x1]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.2:
	ldr	x0, [x21]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_3:
	ldr	x0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
	cmp	w22, #1
	b.lt	LBB0_9
; %bb.5:
	mov	x20, x2
	mov	x23, #0
	mov	x24, #0
	ldr	x8, [x19, #8]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x8, x23
	mov	x1, x20
	mov	w2, #4
	bl	_memcmp
	cbz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	w10, [x8, x23]
	ldrsw	x9, [x19, #4]
	cmp	w22, w9
	ccmp	w10, #0, #0, eq
	csel	w22, w24, w22, eq
	add	x24, x24, #1
	add	x23, x23, #4
	cmp	x24, x9
	b.lt	LBB0_6
; %bb.8:
	cmp	w22, w9
	b.ne	LBB0_14
LBB0_9:
	ldr	x0, [x21]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh10:
	adrp	x8, _EALREADY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_11
LBB0_14:
	add	x0, x8, w22, sxtw #2
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PKEY table not allocated\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"PKEY table is full\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EALREADY,4,2                   ; @EALREADY
l_.str.2:                               ; @.str.2
	.asciz	"PKEY table is FULL but count is not MAX??\n"

.subsections_via_symbols
