	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_find_pkey                   ## -- Begin function ib_find_pkey
	.p2align	4, 0x90
_ib_find_pkey:                          ## @ib_find_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	cmpl	$0, (%rax,%rsi,4)
	jle	LBB0_10
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	$-1, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	(%r13), %rax
	cmpl	(%rax,%r12,4), %ebx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	leaq	-44(%rbp), %rcx
	callq	_ib_query_pkey
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax
	movl	%eax, %ecx
	xorl	%r15d, %ecx
	testl	$32767, %ecx                    ## imm = 0x7FFF
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	cmovsl	%ebx, %r14d
	jmp	LBB0_7
LBB0_8:
	testl	%r14d, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	js	LBB0_10
## %bb.9:
	movl	%r14d, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_find_pkey                   ; -- Begin function ib_find_pkey
	.p2align	2
_ib_find_pkey:                          ; @ib_find_pkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x8, [x0]
	ldr	w8, [x8, x1, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w23, #0
	mov	w24, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	ldr	x8, [x22]
	ldr	w8, [x8, x21, lsl #2]
	cmp	w23, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #12
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_ib_query_pkey
	cbnz	w0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	eor	w9, w8, w20
	tst	w9, #0x7fff
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w8, #15, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #0
	csel	w24, w23, w24, lt
	b	LBB0_2
LBB0_7:
	tbnz	w24, #31, LBB0_9
; %bb.8:
	mov	w0, #0
	str	w24, [x19]
	b	LBB0_10
LBB0_9:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	mov	w0, #0
	str	w23, [x19]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
