	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_slave_port_pkey_ix
_find_slave_port_pkey_ix:               ## @find_slave_port_pkey_ix
	.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
	movq	%r8, %r15
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	callq	_mlx4_master_func_num
	cmpl	%r14d, %eax
	jne	LBB0_1
## %bb.15:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movq	%r15, %rcx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ib_find_cached_pkey            ## TAILCALL
LBB0_1:
	movq	16(%rbx), %rax
	movq	(%rax), %rcx
	cmpl	$0, (%rcx,%r12,4)
	jle	LBB0_13
## %bb.2:
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	(%rax,%r12,8), %rdx
	decq	%rdx
	movslq	%r14d, %r15
	movl	$255, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movslq	(%rax,%r12,4), %rax
	cmpq	%rax, %r13
	jge	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	movq	-8(%rax,%r12,8), %rax
	movq	(%rax,%r13,8), %r14
	cmpq	%rdx, %r14
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	leaq	-64(%rbp), %rcx
	callq	_ib_get_cached_pkey
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-64(%rbp), %eax
	movl	%eax, %ecx
	xorl	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	testl	$32767, %ecx                    ## imm = 0x7FFF
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$255, %rax
	cmoveq	%r14, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_11:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$254, %rcx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	ja	LBB0_13
## %bb.12:
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_find_slave_port_pkey_ix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_slave_port_pkey_ix
_find_slave_port_pkey_ix:               ; @find_slave_port_pkey_ix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	ldr	x0, [x0, #16]
	bl	_mlx4_master_func_num
	cmp	w0, w23
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ib_find_cached_pkey
LBB0_2:
	ldr	x8, [x22, #16]
	ldr	x9, [x8]
	ldr	w9, [x9, x21, lsl #2]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x24, #0
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x21, lsl #3]
	sub	x25, x8, #1
	sxtw	x27, w23
	sub	x28, x21, #1
	mov	w26, #255
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	x8, [x22, #16]
	ldr	x8, [x8]
	ldrsw	x8, [x8, x21, lsl #2]
	cmp	x24, x8
	b.ge	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x27, lsl #3]
	ldr	x8, [x8, x28, lsl #3]
	ldr	x23, [x8, x24, lsl #3]
	cmp	x23, x25
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x3, sp, #12
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_ib_get_cached_pkey
	cbnz	w0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #12]
	eor	w9, w8, w20
	tst	w9, #0x7fff
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w8, #15, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x26, #255
	csel	x26, x23, x26, eq
	b	LBB0_4
LBB0_10:
	cmp	x26, #254
	b.hi	LBB0_12
; %bb.11:
	mov	w0, #0
	str	w26, [x19]
	b	LBB0_13
LBB0_12:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	mov	w0, #0
	str	w23, [x19]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_find_slave_port_pkey_ix
.subsections_via_symbols
