	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function last_used_pkey_index
_last_used_pkey_index:                  ## @last_used_pkey_index
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_CL_ASSERT
	movq	(%rbx), %rsi
	decq	%rsi
	movq	%rbx, %rdi
	callq	_osm_pkey_tbl_new_block_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_3
## %bb.4:
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_cl_ntoh16
	movq	_IB_NUM_PKEY_ELEMENTS_IN_BLOCK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.6:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rbx
	testq	%rbx, %rbx
	jne	LBB0_9
	jmp	LBB0_8
LBB0_1:
	movl	$1, %eax
	jmp	LBB0_12
LBB0_3:
	movq	_IB_NUM_PKEY_ELEMENTS_IN_BLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_8:
	movq	%rcx, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rbx), %r12
	movq	(%r15), %rax
	movl	-4(%rax,%rbx,4), %edi
	callq	_ib_pkey_is_invalid
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$1, %rbx
	movq	%r12, %rbx
	jne	LBB0_9
LBB0_11:
	movq	%r12, (%r14)
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
	testq	%rbx, %rbx
	jne	LBB0_9
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_NUM_PKEY_ELEMENTS_IN_BLOCK,8,3 ## @IB_NUM_PKEY_ELEMENTS_IN_BLOCK
	.no_dead_strip	_last_used_pkey_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function last_used_pkey_index
_last_used_pkey_index:                  ; @last_used_pkey_index
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x2
	bl	_CL_ASSERT
	ldr	x8, [x22]
	sub	x1, x8, #1
	mov	x0, x22
	bl	_osm_pkey_tbl_new_block_get
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldp	x8, x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_cl_ntoh16
Lloh0:
	adrp	x8, _IB_NUM_PKEY_ELEMENTS_IN_BLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_NUM_PKEY_ELEMENTS_IN_BLOCK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	udiv	x8, x0, x9
	msub	x8, x8, x9, x0
	cbnz	x8, LBB0_6
; %bb.3:
	mov	x8, x9
	b	LBB0_6
LBB0_4:
	mov	w0, #1
	b	LBB0_10
LBB0_5:
Lloh3:
	adrp	x8, _IB_NUM_PKEY_ELEMENTS_IN_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_NUM_PKEY_ELEMENTS_IN_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
LBB0_6:
	sub	x21, x8, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8, x21, lsl #2]
	bl	_ib_pkey_is_invalid
	subs	x21, x21, #1
	cset	w8, hs
	cbz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	tbnz	w8, #0, LBB0_7
LBB0_9:
	mov	w0, #0
	add	x8, x21, #1
	str	x8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_NUM_PKEY_ELEMENTS_IN_BLOCK,8,3 ; @IB_NUM_PKEY_ELEMENTS_IN_BLOCK
	.no_dead_strip	_last_used_pkey_index
.subsections_via_symbols
