	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_getwatermark       ## -- Begin function bufferevent_getwatermark
	.p2align	4, 0x90
_bufferevent_getwatermark:              ## @bufferevent_getwatermark
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	cmpw	%si, (%rax)
	jne	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_BEV_LOCK
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	movq	16(%rbx), %rax
	movq	%rax, (%r15)
LBB0_3:
	testq	%r14, %r14
	je	LBB0_11
## %bb.4:
	leaq	24(%rbx), %rax
	jmp	LBB0_10
LBB0_5:
	movq	_EV_READ@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	cmpw	%si, (%rcx)
	jne	LBB0_12
## %bb.6:
	movq	%rbx, %rdi
	callq	_BEV_LOCK
	testq	%r15, %r15
	je	LBB0_8
## %bb.7:
	movq	(%rbx), %rax
	movq	%rax, (%r15)
LBB0_8:
	testq	%r14, %r14
	je	LBB0_11
## %bb.9:
	leaq	8(%rbx), %rax
LBB0_10:
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_11:
	movq	%rbx, %rdi
	callq	_BEV_UNLOCK
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_WRITE,2,1                   ## @EV_WRITE
	.comm	_EV_READ,2,1                    ## @EV_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_getwatermark       ; -- Begin function bufferevent_getwatermark
	.p2align	2
_bufferevent_getwatermark:              ; @bufferevent_getwatermark
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
	and	w8, w1, #0xffff
Lloh0:
	adrp	x9, _EV_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EV_WRITE@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_BEV_LOCK
	cbz	x21, LBB0_3
; %bb.2:
	ldr	x8, [x19, #16]
	str	x8, [x21]
LBB0_3:
	cbz	x20, LBB0_11
; %bb.4:
	add	x8, x19, #24
	b	LBB0_10
LBB0_5:
Lloh2:
	adrp	x9, _EV_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EV_READ@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_12
; %bb.6:
	mov	x0, x19
	bl	_BEV_LOCK
	cbz	x21, LBB0_8
; %bb.7:
	ldr	x8, [x19]
	str	x8, [x21]
LBB0_8:
	cbz	x20, LBB0_11
; %bb.9:
	add	x8, x19, #8
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_11:
	mov	x0, x19
	bl	_BEV_UNLOCK
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_WRITE,2,1                   ; @EV_WRITE
	.comm	_EV_READ,2,1                    ; @EV_READ
.subsections_via_symbols
