	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_pkey
_add_pkey:                              ## @add_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	andl	$32767, %r15d                   ## imm = 0x7FFF
	xorl	%eax, %eax
	cmpl	$32767, %r15d                   ## imm = 0x7FFF
	je	LBB0_22
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_13
## %bb.2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	andl	$32767, %eax                    ## imm = 0x7FFF
	cmpl	%r15d, %eax
	je	LBB0_20
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %rbx
	cmpq	%rax, %r14
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movl	(%rdi,%rbx), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	callq	_atomic_inc_return
	cmpl	$1, %eax
	jg	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	callq	_atomic_dec
	incl	%r13d
	movq	(%r12), %rdi
	movl	(%rdi,%rbx), %eax
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	jmp	LBB0_5
LBB0_6:
	testl	%r13d, %r13d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_13
## %bb.7:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r14
	cmpq	%rax, %rbx
	jge	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpl	$0, (%rdi,%r14)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%r12), %rdi
	addq	%r14, %rdi
	callq	_atomic_inc_return
	cmpl	$1, %eax
	je	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rdi
	jmp	LBB0_12
LBB0_13:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_20:
	movq	_EEXIST@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_21:
	movq	(%r12), %rax
	movl	%r15d, (%rax,%r14)
	movl	$1, %eax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_add_pkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_pkey
_add_pkey:                              ; @add_pkey
	.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
	and	w21, w1, #0x7fff
	mov	w8, #32767
	cmp	w21, w8
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_21
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.3:
	mov	x22, #0
	mov	x24, #0
	mov	w23, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	and	w8, w8, #0x7fff
	cmp	w8, w21
	b.eq	LBB0_19
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #4
	cmp	x24, w0, sxtw
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w8, [x0, x22]
	cbz	w8, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #8]
	add	x0, x8, x22
	bl	_atomic_inc_return
	cmp	w0, #1
	b.gt	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #8]
	add	x0, x8, x22
	bl	_atomic_dec
	add	w23, w23, #1
	ldr	x0, [x20]
	ldr	w8, [x0, x22]
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w23, w23, #1
	b	LBB0_5
LBB0_11:
	cbz	w23, LBB0_18
; %bb.12:
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.13:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x21, x21, #4
	cmp	x22, w0, sxtw
	b.ge	LBB0_18
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w8, [x0, x21]
	cbnz	w8, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x20, #8]
	add	x0, x8, x21
	bl	_atomic_inc_return
	cmp	w0, #1
	b.eq	LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x20]
	b	LBB0_14
LBB0_18:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh2:
	adrp	x8, _EEXIST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w0, w8
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
LBB0_22:
	ldr	x8, [x20]
	str	w19, [x8, x21]
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_add_pkey
.subsections_via_symbols
