	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __key_update
___key_update:                          ## @__key_update
	.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	%rdx, %r12
	movq	%rsi, %r13
	movl	%edi, %r14d
	callq	_key_ref_to_ptr
	movq	%rax, %r15
	movq	_KEY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_key_permission
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	callq	_down_write
	movq	8(%r15), %rax
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_up_write
	testl	%ebx, %ebx
	jns	LBB0_8
	jmp	LBB0_2
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_2
LBB0_4:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_2:
	movq	%r15, %rdi
	callq	_key_put
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_6:
	movq	_KEY_FLAG_NEGATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	addq	$4, %rsi
	callq	_clear_bit
	movq	%r15, %rdi
	callq	_up_write
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_WRITE,4,2                  ## @KEY_WRITE
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_KEY_FLAG_NEGATIVE,4,2          ## @KEY_FLAG_NEGATIVE
	.no_dead_strip	___key_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __key_update
___key_update:                          ; @__key_update
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_key_ref_to_ptr
	mov	x19, x0
Lloh0:
	adrp	x8, _KEY_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_key_permission
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_down_write
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	blr	x8
	cbz	w0, LBB0_7
; %bb.3:
	mov	x23, x0
	mov	x0, x19
	bl	_up_write
	tbz	w23, #31, LBB0_8
	b	LBB0_6
LBB0_4:
	mov	x23, x0
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EEXIST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_6:
	mov	x0, x19
	bl	_key_put
	mov	x0, x23
	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
	b	_ERR_PTR
LBB0_7:
Lloh6:
	adrp	x8, _KEY_FLAG_NEGATIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_FLAG_NEGATIVE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_clear_bit
	mov	x0, x19
	bl	_up_write
LBB0_8:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_WRITE,4,2                  ; @KEY_WRITE
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_KEY_FLAG_NEGATIVE,4,2          ; @KEY_FLAG_NEGATIVE
	.no_dead_strip	___key_update
.subsections_via_symbols
