	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egress_pkey_check              ## -- Begin function egress_pkey_check
	.p2align	4, 0x90
_egress_pkey_check:                     ## @egress_pkey_check
	.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	_HFI1_PART_ENFORCE_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	testl	%eax, (%rdi)
	je	LBB0_10
## %bb.1:
	movl	%edx, %r12d
	movq	%rdi, %rbx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	cmpl	$15, %ecx
	sete	%cl
	movq	_PKEY_LOW_15_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	andl	%r12d, %eax
	cmpl	%edx, %eax
	setne	%dl
	testb	%dl, %cl
	jne	LBB0_8
## %bb.2:
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movq	24(%rbx), %rax
	movl	(%rax,%r8,4), %esi
	movl	%r12d, %edi
	callq	_egress_pkey_matches_entry
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	movq	_MAX_PKEY_VALUES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	movl	(%rax,%r14,4), %esi
	movl	%r12d, %edi
	callq	_egress_pkey_matches_entry
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_7
LBB0_8:
	leaq	16(%rbx), %rdi
	callq	_incr_cntr64
	movq	8(%rbx), %rax
	movl	(%rax), %ecx
	movq	_OPA_EI_STATUS_SMASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	$1, %r15d
	testl	%ecx, %edx
	jne	LBB0_10
## %bb.9:
	orl	%ecx, %edx
	movl	%edx, (%rax)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 8(%rax)
	movl	%r12d, 4(%rax)
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_PART_ENFORCE_OUT,4,2      ## @HFI1_PART_ENFORCE_OUT
	.comm	_PKEY_LOW_15_MASK,4,2           ## @PKEY_LOW_15_MASK
	.comm	_MAX_PKEY_VALUES,4,2            ## @MAX_PKEY_VALUES
	.comm	_OPA_EI_STATUS_SMASK,4,2        ## @OPA_EI_STATUS_SMASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egress_pkey_check              ; -- Begin function egress_pkey_check
	.p2align	2
_egress_pkey_check:                     ; @egress_pkey_check
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _HFI1_PART_ENFORCE_OUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFI1_PART_ENFORCE_OUT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh3:
	adrp	x8, _PKEY_LOW_15_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PKEY_LOW_15_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w9, w8, w2
	cmp	w9, w8
	ccmp	w3, #15, #0, ne
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_5
LBB0_2:
	add	x0, x21, #16
	bl	_incr_cntr64
	ldr	x8, [x21, #8]
	ldr	w9, [x8]
Lloh6:
	adrp	x10, _OPA_EI_STATUS_SMASK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _OPA_EI_STATUS_SMASK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_4
; %bb.3:
	orr	w9, w10, w9
	stp	w19, w20, [x8, #4]
	str	w9, [x8]
LBB0_4:
	mov	w0, #1
	b	LBB0_7
LBB0_5:
	ldr	x8, [x21, #24]
	ldr	w1, [x8, x4, lsl #2]
	mov	x0, x19
	bl	_egress_pkey_matches_entry
	cbz	x0, LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	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_8:
Lloh9:
	adrp	x22, _MAX_PKEY_VALUES@GOTPAGE
Lloh10:
	ldr	x22, [x22, _MAX_PKEY_VALUES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.9:
	mov	x23, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #24]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x19
	bl	_egress_pkey_matches_entry
	cbnz	x0, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_10
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_PART_ENFORCE_OUT,4,2      ; @HFI1_PART_ENFORCE_OUT
	.comm	_PKEY_LOW_15_MASK,4,2           ; @PKEY_LOW_15_MASK
	.comm	_MAX_PKEY_VALUES,4,2            ; @MAX_PKEY_VALUES
	.comm	_OPA_EI_STATUS_SMASK,4,2        ; @OPA_EI_STATUS_SMASK
.subsections_via_symbols
