	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_payload_reserve            ## -- Begin function key_payload_reserve
	.p2align	4, 0x90
_key_payload_reserve:                   ## @key_payload_reserve
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %ebx
	callq	_key_check
	movl	%r14d, %r13d
	subl	%ebx, %r13d
	je	LBB0_6
## %bb.1:
	movq	_KEY_FLAG_IN_QUOTA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	8(%r15), %rdi
	movq	(%rdi), %rbx
	movq	_key_quota_root_maxbytes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_key_quota_maxbytes@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	addq	$12, %rdi
	callq	_spin_lock
	testl	%r13d, %r13d
	jle	LBB0_3
## %bb.4:
	testq	%rbx, %rbx
	cmovel	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	8(%r15), %rdi
	movl	8(%rdi), %eax
	addl	%r13d, %eax
	cmpl	%r12d, %eax
	jb	LBB0_5
## %bb.7:
	movq	_EDQUOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addq	$12, %rdi
	callq	_spin_unlock
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.8:
	negl	%ebx
	jmp	LBB0_9
LBB0_3:
	movq	8(%r15), %rdi
	movl	8(%rdi), %eax
	addl	%r13d, %eax
LBB0_5:
	movl	%eax, 8(%rdi)
	addl	%r13d, 4(%r15)
	addq	$12, %rdi
	callq	_spin_unlock
LBB0_6:
	movl	%r14d, (%r15)
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_FLAG_IN_QUOTA,4,2          ## @KEY_FLAG_IN_QUOTA
	.comm	_key_quota_root_maxbytes,4,2    ## @key_quota_root_maxbytes
	.comm	_key_quota_maxbytes,4,2         ## @key_quota_maxbytes
	.comm	_EDQUOT,4,2                     ## @EDQUOT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_payload_reserve            ; -- Begin function key_payload_reserve
	.p2align	2
_key_payload_reserve:                   ; @key_payload_reserve
	.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, x1
	mov	x20, x0
	ldr	w21, [x0]
	bl	_key_check
	subs	w21, w19, w21
	b.eq	LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _KEY_FLAG_IN_QUOTA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_FLAG_IN_QUOTA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x20, #16
	bl	_test_bit
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x0, [x20, #8]
	ldr	x22, [x0], #12
Lloh3:
	adrp	x8, _key_quota_root_maxbytes@GOTPAGE
Lloh4:
	ldr	x8, [x8, _key_quota_root_maxbytes@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _key_quota_maxbytes@GOTPAGE
Lloh7:
	ldr	x8, [x8, _key_quota_maxbytes@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
	bl	_spin_lock
	cmp	w21, #0
	b.le	LBB0_6
; %bb.3:
	cmp	x22, #0
	csel	w10, w23, w24, eq
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #8]
	add	w9, w9, w21
	cmp	w9, w10
	b.lo	LBB0_7
; %bb.4:
Lloh9:
	adrp	x9, _EDQUOT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EDQUOT@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x9]
	add	x0, x8, #12
	bl	_spin_unlock
	cbz	w21, LBB0_8
; %bb.5:
	neg	w0, w21
	b	LBB0_9
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #8]
	add	w9, w9, w21
LBB0_7:
	str	w9, [x8, #8]
	ldr	w9, [x20, #4]
	add	w9, w9, w21
	str	w9, [x20, #4]
	add	x0, x8, #12
	bl	_spin_unlock
LBB0_8:
	mov	w0, #0
	str	w19, [x20]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_FLAG_IN_QUOTA,4,2          ; @KEY_FLAG_IN_QUOTA
	.comm	_key_quota_root_maxbytes,4,2    ; @key_quota_root_maxbytes
	.comm	_key_quota_maxbytes,4,2         ; @key_quota_maxbytes
	.comm	_EDQUOT,4,2                     ; @EDQUOT
.subsections_via_symbols
