	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_new                ## -- Begin function bufferevent_new
	.p2align	4, 0x90
_bufferevent_new:                       ## @bufferevent_new
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r13
	movl	%edi, %r14d
	movl	$1, %edi
	movl	$64, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_evbuffer_new
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_evbuffer_new
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	44(%rbx), %rdi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_bufferevent_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movq	%rbx, %r8
	callq	_event_set
	movq	%rbx, %rdi
	addq	$40, %rdi
	movq	_EV_WRITE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_bufferevent_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movq	%rbx, %r8
	callq	_event_set
	movq	%r13, 32(%rbx)
	movq	%r12, 24(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	(%r15), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_evbuffer_free
LBB0_6:
	movq	%rbx, %rdi
	callq	_free
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_bufferevent_readcb,4,2         ## @bufferevent_readcb
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_bufferevent_writecb,4,2        ## @bufferevent_writecb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_new                ; -- Begin function bufferevent_new
	.p2align	2
_bufferevent_new:                       ; @bufferevent_new
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	mov	w0, #1
	mov	w1, #64
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	bl	_evbuffer_new
	str	x0, [x19, #48]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x25, x0
	bl	_evbuffer_new
	str	x0, [x19, #56]
	cbz	x0, LBB0_4
; %bb.3:
	add	x0, x19, #44
Lloh0:
	adrp	x8, _EV_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _bufferevent_readcb@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bufferevent_readcb@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x1, x24
	mov	x4, x19
	bl	_event_set
	add	x0, x19, #40
Lloh6:
	adrp	x25, _EV_WRITE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EV_WRITE@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh8:
	adrp	x8, _bufferevent_writecb@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bufferevent_writecb@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x1, x24
	mov	x4, x19
	bl	_event_set
	stp	x22, x23, [x19, #24]
	str	w21, [x19, #16]
	str	x20, [x19, #8]
	ldr	w8, [x25]
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
	mov	x0, x25
	bl	_evbuffer_free
LBB0_5:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_bufferevent_readcb,4,2         ; @bufferevent_readcb
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_bufferevent_writecb,4,2        ; @bufferevent_writecb
.subsections_via_symbols
