	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReleaseAndReadBuffer           ## -- Begin function ReleaseAndReadBuffer
	.p2align	4, 0x90
_ReleaseAndReadBuffer:                  ## @ReleaseAndReadBuffer
	.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, %r15
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movl	%ebx, %edi
	callq	_BufferIsPinned
	movl	%eax, %edi
	callq	_Assert
	movl	%ebx, %edi
	callq	_BufferIsLocal
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	notl	%r12d
	movl	%r12d, %edi
	callq	_GetLocalBufferDescriptor
	cmpq	%r15, (%rax)
	jne	LBB0_5
## %bb.3:
	movq	%rax, %r13
	movl	16(%rax), %edi
	movl	(%r14), %esi
	callq	_RelFileNodeEquals
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 8(%r13)
	je	LBB0_11
LBB0_5:
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_ResourceOwnerForgetBuffer
	movq	_LocalRefCount@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r12d, %rcx
	decl	(%rax,%rcx,4)
	jmp	LBB0_10
LBB0_6:
	movq	%r12, %r13
	leal	-1(%rbx), %edi
	callq	_GetBufferDescriptor
	movq	%rax, %r12
	cmpq	%r15, (%rax)
	jne	LBB0_9
## %bb.7:
	movl	16(%r12), %edi
	movl	(%r14), %esi
	callq	_RelFileNodeEquals
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	cmpq	%r13, 8(%r12)
	jne	LBB0_9
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_UnpinBuffer
LBB0_10:
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ReadBuffer                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAIN_FORKNUM,8,3               ## @MAIN_FORKNUM
	.comm	_CurrentResourceOwner,4,2       ## @CurrentResourceOwner
	.comm	_LocalRefCount,8,3              ## @LocalRefCount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReleaseAndReadBuffer           ; -- Begin function ReleaseAndReadBuffer
	.p2align	2
_ReleaseAndReadBuffer:                  ; @ReleaseAndReadBuffer
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MAIN_FORKNUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	bl	_BufferIsValid
	cbz	x0, LBB0_11
; %bb.1:
	mov	x0, x21
	bl	_BufferIsPinned
	bl	_Assert
	mov	x0, x21
	bl	_BufferIsLocal
	cbz	x0, LBB0_6
; %bb.2:
	mvn	w22, w21
	mov	x0, x22
	bl	_GetLocalBufferDescriptor
	ldr	x8, [x0]
	cmp	x8, x19
	b.ne	LBB0_5
; %bb.3:
	mov	x23, x0
	ldr	w0, [x0, #16]
	ldr	w1, [x20]
	bl	_RelFileNodeEquals
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x23, #8]
	cmp	x8, x24
	b.eq	LBB0_9
LBB0_5:
Lloh3:
	adrp	x8, _CurrentResourceOwner@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CurrentResourceOwner@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_ResourceOwnerForgetBuffer
Lloh6:
	adrp	x8, _LocalRefCount@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LocalRefCount@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	sbfiz	x9, x22, #2, #32
	ldr	w10, [x8, x9]
	sub	w10, w10, #1
	str	w10, [x8, x9]
	b	LBB0_11
LBB0_6:
	sub	w0, w21, #1
	bl	_GetBufferDescriptor
	mov	x22, x0
	ldr	x8, [x0]
	cmp	x8, x19
	b.ne	LBB0_10
; %bb.7:
	ldr	w0, [x22, #16]
	ldr	w1, [x20]
	bl	_RelFileNodeEquals
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x22, #8]
	cmp	x8, x24
	b.ne	LBB0_10
LBB0_9:
	mov	x0, x21
	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_10:
	mov	x0, x22
	mov	w1, #1
	bl	_UnpinBuffer
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	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	_ReadBuffer
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAIN_FORKNUM,8,3               ; @MAIN_FORKNUM
	.comm	_CurrentResourceOwner,4,2       ; @CurrentResourceOwner
	.comm	_LocalRefCount,8,3              ; @LocalRefCount
.subsections_via_symbols
