	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_decrement_write_buckets_ ## -- Begin function bufferevent_decrement_write_buckets_
	.p2align	4, 0x90
_bufferevent_decrement_write_buckets_:  ## @bufferevent_decrement_write_buckets_
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rdi)
	je	LBB0_9
## %bb.3:
	subq	%r15, 24(%rdi)
	jle	LBB0_4
## %bb.5:
	movq	_BEV_SUSPEND_BW@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	testl	%esi, (%rbx)
	je	LBB0_9
## %bb.6:
	testl	%esi, 4(%rbx)
	jne	LBB0_8
## %bb.7:
	addq	$8, %rdi
	callq	_event_del
	movl	(%r12), %esi
LBB0_8:
	leaq	16(%rbx), %rdi
	callq	_bufferevent_unsuspend_write_
	jmp	LBB0_9
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_4:
	leaq	16(%rbx), %rdi
	movq	_BEV_SUSPEND_BW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bufferevent_suspend_write_
	movq	8(%rbx), %rdi
	movq	16(%rdi), %rsi
	addq	$8, %rdi
	callq	_event_add
	movq	%rax, %r14
	sarq	$63, %r14
LBB0_9:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.10:
	callq	_LOCK_GROUP
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	addl	%r15d, 16(%rdi)
	subq	%r15, 8(%rdi)
	jle	LBB0_11
## %bb.12:
	cmpq	$0, (%rdi)
	je	LBB0_14
## %bb.13:
	callq	_bev_group_unsuspend_writing_
	jmp	LBB0_14
LBB0_11:
	callq	_bev_group_suspend_writing_
LBB0_14:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	callq	_UNLOCK_GROUP
LBB0_15:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_SUSPEND_BW,4,2             ## @BEV_SUSPEND_BW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_decrement_write_buckets_ ; -- Begin function bufferevent_decrement_write_buckets_
	.p2align	2
_bufferevent_decrement_write_buckets_:  ; @bufferevent_decrement_write_buckets_
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_7
; %bb.2:
	ldr	x9, [x8, #24]
	sub	x9, x9, x20
	str	x9, [x8, #24]
	cmp	x9, #0
	b.le	LBB0_9
; %bb.3:
	ldr	w9, [x19]
Lloh0:
	adrp	x21, _BEV_SUSPEND_BW@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BEV_SUSPEND_BW@GOTPAGEOFF]
	ldr	w1, [x21]
	tst	w1, w9
	b.eq	LBB0_7
; %bb.4:
	ldr	w9, [x19, #4]
	tst	w9, w1
	b.ne	LBB0_6
; %bb.5:
	add	x0, x8, #8
	bl	_event_del
	ldr	w1, [x21]
LBB0_6:
	add	x0, x19, #16
	bl	_bufferevent_unsuspend_write_
LBB0_7:
	mov	w21, #0
	b	LBB0_10
LBB0_8:
	mov	w21, #0
	b	LBB0_16
LBB0_9:
	add	x0, x19, #16
Lloh2:
	adrp	x8, _BEV_SUSPEND_BW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BEV_SUSPEND_BW@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_bufferevent_suspend_write_
	ldr	x8, [x19, #8]
	add	x0, x8, #8
	ldr	x1, [x8, #16]
	bl	_event_add
	asr	x21, x0, #63
LBB0_10:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_16
; %bb.11:
	bl	_LOCK_GROUP
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	x8, [x0, #8]
	sub	x8, x8, x20
	str	x8, [x0, #8]
	ldr	w9, [x0, #16]
	add	w9, w9, w20
	str	w9, [x0, #16]
	cmp	x8, #0
	b.le	LBB0_14
; %bb.12:
	ldr	x8, [x0]
	cbz	x8, LBB0_15
; %bb.13:
	bl	_bev_group_unsuspend_writing_
	b	LBB0_15
LBB0_14:
	bl	_bev_group_suspend_writing_
LBB0_15:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_UNLOCK_GROUP
LBB0_16:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_SUSPEND_BW,4,2             ; @BEV_SUSPEND_BW
.subsections_via_symbols
