	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EDIT_UnlockBuffer
_EDIT_UnlockBuffer:                     ## @EDIT_UnlockBuffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_IsWindow
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.6:
	testq	%r14, %r14
	jne	LBB0_8
## %bb.7:
	cmpl	$1, %eax
	jne	LBB0_10
LBB0_8:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.9:
	callq	_LocalUnlock
	movq	$0, 8(%rbx)
	movl	(%rbx), %eax
LBB0_10:
	decl	%eax
	movl	%eax, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movl	24(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_3
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"edit hwnd %p already destroyed\n"

L_.str.1:                               ## @.str.1
	.asciz	"lock_count == 0 ... please report\n"

L_.str.2:                               ## @.str.2
	.asciz	"es->text == 0 ... please report\n"

L_.str.3:                               ## @.str.3
	.asciz	"no buffer ... please report\n"

	.no_dead_strip	_EDIT_UnlockBuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EDIT_UnlockBuffer
_EDIT_UnlockBuffer:                     ; @EDIT_UnlockBuffer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_IsWindow
	cbz	w0, LBB0_8
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.2:
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_10
; %bb.3:
	cbnz	x20, LBB0_5
; %bb.4:
	cmp	w8, #1
	b.ne	LBB0_7
LBB0_5:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_11
; %bb.6:
	bl	_LocalUnlock
	str	xzr, [x19, #8]
	ldr	w8, [x19]
LBB0_7:
	sub	w8, w8, #1
	str	w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w1, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WARN
LBB0_9:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ERR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"edit hwnd %p already destroyed\n"

l_.str.1:                               ; @.str.1
	.asciz	"lock_count == 0 ... please report\n"

l_.str.2:                               ; @.str.2
	.asciz	"es->text == 0 ... please report\n"

l_.str.3:                               ; @.str.3
	.asciz	"no buffer ... please report\n"

	.no_dead_strip	_EDIT_UnlockBuffer
.subsections_via_symbols
