	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_commit_space          ## -- Begin function evbuffer_commit_space
	.p2align	4, 0x90
_evbuffer_commit_space:                 ## @evbuffer_commit_space
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	callq	_EVBUFFER_LOCK
	movl	$-1, %ebx
	cmpq	$0, 32(%r13)
	je	LBB0_2
LBB0_1:
	movq	%r13, %rdi
	callq	_EVBUFFER_UNLOCK
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.3:
	cmpl	$1, %r15d
	jne	LBB0_6
## %bb.4:
	movq	24(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movq	(%r12), %r14
	callq	_CHAIN_SPACE_PTR
	cmpq	%rax, %r14
	je	LBB0_24
LBB0_6:
	movq	16(%r13), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.7:
	callq	_CHAIN_SPACE_LEN
	testq	%rax, %rax
	je	LBB0_21
## %bb.8:
	testl	%r15d, %r15d
	jg	LBB0_9
	jmp	LBB0_22
LBB0_19:
	movl	%r15d, %ebx
	jmp	LBB0_1
LBB0_21:
	movq	(%r14), %r14
	addq	$8, %r14
	testl	%r15d, %r15d
	jle	LBB0_22
LBB0_9:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	shlq	$4, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12,%r15), %r13
	movq	%rbx, %rdi
	callq	_CHAIN_SPACE_PTR
	cmpq	%rax, %r13
	jne	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %r13
	movq	8(%r12,%r15), %r12
	movq	%rbx, %rdi
	callq	_CHAIN_SPACE_LEN
	cmpq	%rax, %r12
	ja	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	addq	$8, %rbx
	addq	$16, %r15
	cmpq	%r15, -72(%rbp)                 ## 8-byte Folded Reload
	movq	%r13, %r12
	jne	LBB0_10
## %bb.14:
	cmpl	$1, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_27
## %bb.15:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:
	testb	$1, %bl
	je	LBB0_23
## %bb.17:
	shlq	$4, %rax
	movq	8(%r12,%rax), %rax
	movq	(%r14), %rcx
	addq	%rax, (%rcx)
	addq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	movq	%r14, 16(%r13)
	jmp	LBB0_23
LBB0_20:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	$-1, %ebx
	jmp	LBB0_1
LBB0_24:
	movq	8(%r12), %r14
	movq	24(%r13), %rdi
	callq	_CHAIN_SPACE_LEN
	cmpq	%rax, %r14
	ja	LBB0_1
## %bb.25:
	movq	8(%r12), %r15
	movq	24(%r13), %rax
	addq	%r15, (%rax)
	testq	%r15, %r15
	je	LBB0_22
## %bb.26:
	movq	%r13, %rdi
	callq	_advance_last_with_data
	jmp	LBB0_23
LBB0_22:
	xorl	%r15d, %r15d
LBB0_23:
	movdqu	(%r13), %xmm0
	movq	%r15, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, (%r13)
	movq	%r13, %rdi
	callq	_evbuffer_invoke_callbacks_
	xorl	%ebx, %ebx
	jmp	LBB0_1
LBB0_27:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %ecx
	andl	$-2, %ecx
	leaq	24(%r12), %rdx
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_29 Depth=1
	addq	%rdi, %r15
	addq	$8, %r14
	addq	$2, %rax
	addq	$32, %rdx
	cmpq	%rax, %rcx
	je	LBB0_16
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	-16(%rdx), %rdi
	movq	(%r14), %rsi
	addq	%rdi, (%rsi)
	testq	%rdi, %rdi
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	%r14, 16(%r13)
	movq	(%r14), %rsi
LBB0_31:                                ##   in Loop: Header=BB0_29 Depth=1
	addq	%rdi, %r15
	movq	(%rdx), %rdi
	movq	8(%rsi), %r14
	addq	%rdi, (%r14)
	testq	%rdi, %rdi
	je	LBB0_28
## %bb.32:                              ##   in Loop: Header=BB0_29 Depth=1
	addq	$8, %rsi
	movq	%rsi, 16(%r13)
	movq	(%rsi), %r14
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_commit_space          ; -- Begin function evbuffer_commit_space
	.p2align	2
_evbuffer_commit_space:                 ; @evbuffer_commit_space
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_EVBUFFER_LOCK
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w21, #-1
LBB0_2:
	mov	x0, x19
	bl	_EVBUFFER_UNLOCK
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	cbz	w21, LBB0_2
; %bb.4:
	cmp	w21, #1
	b.ne	LBB0_7
; %bb.5:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x22, [x20]
	bl	_CHAIN_SPACE_PTR
	cmp	x22, x0
	b.eq	LBB0_22
LBB0_7:
	ldr	x22, [x19, #16]
	ldr	x0, [x22]
	cbz	x0, LBB0_1
; %bb.8:
	bl	_CHAIN_SPACE_LEN
	cbz	x0, LBB0_19
; %bb.9:
	cmp	w21, #1
	b.lt	LBB0_20
LBB0_10:
	mov	w23, w21
	add	x24, x20, #8
	mov	x25, x23
	mov	x8, x22
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x8]
	cbz	x21, LBB0_1
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldur	x26, [x24, #-8]
	mov	x0, x21
	bl	_CHAIN_SPACE_PTR
	cmp	x26, x0
	b.ne	LBB0_1
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x26, [x24]
	mov	x0, x21
	bl	_CHAIN_SPACE_LEN
	cmp	x26, x0
	b.hi	LBB0_1
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x21, #8
	add	x24, x24, #16
	subs	x25, x25, #1
	b.ne	LBB0_11
; %bb.15:
	mov	x21, #0
	add	x8, x20, #8
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x21, x9, x21
	add	x22, x10, #8
	add	x8, x8, #16
	subs	x23, x23, #1
	b.eq	LBB0_21
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	ldr	x10, [x22]
	ldr	x11, [x10]
	add	x11, x11, x9
	str	x11, [x10]
	cbz	x9, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	str	x22, [x19, #16]
	ldr	x10, [x22]
	b	LBB0_16
LBB0_19:
	ldr	x8, [x22]
	add	x22, x8, #8
	cmp	w21, #1
	b.ge	LBB0_10
LBB0_20:
	mov	x21, #0
LBB0_21:
	ldr	q0, [x19]
	dup.2d	v1, x21
	add.2d	v0, v0, v1
	str	q0, [x19]
	mov	x0, x19
	bl	_evbuffer_invoke_callbacks_
	mov	w21, #0
	b	LBB0_2
LBB0_22:
	ldr	x21, [x20, #8]
	ldr	x0, [x19, #24]
	bl	_CHAIN_SPACE_LEN
	cmp	x21, x0
	b.hi	LBB0_1
; %bb.23:
	ldr	x21, [x20, #8]
	ldr	x8, [x19, #24]
	ldr	x9, [x8]
	add	x9, x9, x21
	str	x9, [x8]
	cbz	x21, LBB0_21
; %bb.24:
	mov	x0, x19
	bl	_advance_last_with_data
	b	LBB0_21
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
