	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_pkeys
_init_pkeys:                            ## @init_pkeys
	.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	%rdi, %r14
	movq	16(%rdi), %rdi
	callq	_mlx4_is_master
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	16(%r14), %rdi
	movq	16(%rdi), %rax
	cmpl	$0, (%rax)
	js	LBB0_10
## %bb.2:
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%r15), %rax
	movq	16(%rdi), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %r15
	movq	%rax, %r15
	jge	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$0, 8(%rdi)
	jle	LBB0_21
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=2
	leaq	1(%r12), %rax
	movslq	8(%rdi), %rcx
	cmpq	%rcx, %r12
	movq	%rax, %r12
	jge	LBB0_21
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	movq	(%rdi), %rax
	cmpl	$0, (%rax,%r12,4)
	jle	LBB0_20
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=3
	movl	%ebx, %r8d
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=3
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	-8(%rax,%r12,8), %rax
	movl	%r8d, (%rax,%rbx,4)
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_mlx4_sync_pkey_table
	incq	%rbx
	movq	16(%r14), %rdi
	movq	(%rdi), %rax
	movslq	(%rax,%r12,4), %rax
	cmpq	%rax, %rbx
	jge	LBB0_20
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	callq	_mlx4_master_func_num
	movl	%eax, %eax
	movq	16(%r14), %rdi
	cmpq	%rax, %r15
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=3
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=3
	movq	(%rdi), %rax
	movl	(%rax,%r12,4), %r8d
	decl	%r8d
	jmp	LBB0_19
LBB0_10:
	movl	8(%rdi), %esi
	testl	%esi, %esi
	jle	LBB0_17
## %bb.11:
	movq	(%rdi), %rax
	movl	$1, %edx
	movl	$65535, %r8d                    ## imm = 0xFFFF
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	leaq	1(%rdx), %rcx
	movslq	%esi, %rbx
	cmpq	%rbx, %rdx
	movq	%rcx, %rdx
	jge	LBB0_17
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	cmpl	$0, (%rax,%rdx,4)
	jle	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%r14), %rsi
	movq	-8(%rsi,%rdx,8), %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rbx, %rbx
	movl	$0, %ecx
	cmovel	%r8d, %ecx
	movl	%ecx, (%rsi,%rbx,4)
	incq	%rbx
	movslq	(%rax,%rdx,4), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	8(%rdi), %esi
	jmp	LBB0_16
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_init_pkeys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_pkeys
_init_pkeys:                            ; @init_pkeys
	.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	x19, x0
	ldr	x0, [x0, #16]
	bl	_mlx4_is_master
	cbz	x0, LBB0_21
; %bb.1:
	ldr	x0, [x19, #16]
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	tbnz	w8, #31, LBB0_14
; %bb.2:
	mov	x20, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x20, #1
	ldr	x9, [x0, #16]
	ldrsw	x9, [x9]
	cmp	x20, x9
	mov	x20, x8
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_11 Depth 3
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x8, x21, #1
	ldrsw	x9, [x0, #8]
	cmp	x21, x9
	mov	x21, x8
	b.ge	LBB0_3
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_11 Depth 3
	ldr	x8, [x0]
	ldr	w8, [x8, x21, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x22, #0
	sub	x23, x21, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=3
	mov	x4, x22
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=3
	ldr	x8, [x19]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8, x23, lsl #3]
	str	w4, [x8, x22, lsl #2]
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_mlx4_sync_pkey_table
	add	x22, x22, #1
	ldr	x0, [x19, #16]
	ldr	x8, [x0]
	ldrsw	x8, [x8, x21, lsl #2]
	cmp	x22, x8
	b.ge	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	bl	_mlx4_master_func_num
	mov	x8, x0
	ldr	x0, [x19, #16]
	cmp	x20, w8, uxtw
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=3
	cbz	x22, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=3
	ldr	x8, [x0]
	ldr	w8, [x8, x21, lsl #2]
	sub	w4, w8, #1
	b	LBB0_10
LBB0_14:
	ldr	w11, [x0, #8]
	cmp	w11, #1
	b.lt	LBB0_21
; %bb.15:
	ldr	x8, [x0]
	mov	w9, #1
	mov	w10, #65535
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	cmp	x9, w11, sxtw
	add	x9, x9, #1
	b.ge	LBB0_21
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	ldr	w12, [x8, x9, lsl #2]
	cmp	w12, #1
	b.lt	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x11, #0
	ldr	x12, [x19, #8]
	add	x12, x12, x9, lsl #3
	ldur	x12, [x12, #-8]
LBB0_19:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x11, #0
	csel	w13, w10, wzr, eq
	str	w13, [x12, x11, lsl #2]
	add	x11, x11, #1
	ldrsw	x13, [x8, x9, lsl #2]
	cmp	x11, x13
	b.lt	LBB0_19
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w11, [x0, #8]
	b	LBB0_16
LBB0_21:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_init_pkeys
.subsections_via_symbols
