	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_enable_locking_    ## -- Begin function bufferevent_enable_locking_
	.p2align	4, 0x90
_bufferevent_enable_locking_:           ## @bufferevent_enable_locking_
	.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	%rsi, %r15
	movq	%rdi, %rbx
	callq	_BEV_UPCAST
	movl	$-1, %r14d
	cmpq	$0, 8(%rax)
	jne	LBB0_14
## %bb.1:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_bufferevent_get_underlying
	movq	%rax, %r12
	testq	%r15, %r15
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%r12, %r12
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_BEV_UPCAST
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_BEV_UPCAST
	movq	8(%rax), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r15, %r15
	je	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_BEV_UPCAST
	movq	%r15, 8(%rax)
	movq	%rbx, %rdi
	callq	_BEV_UPCAST
	movl	$0, (%rax)
	movl	4(%rbx), %edi
	movq	%r15, %rsi
	callq	_evbuffer_enable_locking
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_evbuffer_enable_locking
	testq	%r12, %r12
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_BEV_UPCAST
	cmpq	$0, 8(%rax)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_BEV_UPCAST
	movb	$1, %r13b
	cmpq	$0, 8(%rax)
	movq	%r12, %rbx
	je	LBB0_2
	jmp	LBB0_13
LBB0_11:
	xorl	%r14d, %r14d
	testb	$1, %r13b
	je	LBB0_14
LBB0_13:
	xorl	%r14d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_EVTHREAD_LOCKTYPE_RECURSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_EVTHREAD_ALLOC_LOCK
	testb	$1, %r13b
	jne	LBB0_13
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EVTHREAD_LOCKTYPE_RECURSIVE,4,2 ## @EVTHREAD_LOCKTYPE_RECURSIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_enable_locking_    ; -- Begin function bufferevent_enable_locking_
	.p2align	2
_bufferevent_enable_locking_:           ; @bufferevent_enable_locking_
	.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	x19, x1
	mov	x21, x0
	bl	_BEV_UPCAST
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #-1
	b	LBB0_13
LBB0_2:
	mov	w22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_bufferevent_get_underlying
	mov	x20, x0
	cbnz	x19, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x20, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_BEV_UPCAST
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_BEV_UPCAST
	ldr	x19, [x0, #8]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x19, LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_BEV_UPCAST
	str	x19, [x0, #8]
	mov	x0, x21
	bl	_BEV_UPCAST
	str	wzr, [x0]
	ldr	w0, [x21, #4]
	mov	x1, x19
	bl	_evbuffer_enable_locking
	ldr	w0, [x21]
	mov	x1, x19
	bl	_evbuffer_enable_locking
	cbz	x20, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_BEV_UPCAST
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_BEV_UPCAST
	ldr	x8, [x0, #8]
	mov	w22, #1
	mov	x21, x20
	cbz	x8, LBB0_3
	b	LBB0_12
LBB0_11:
Lloh0:
	adrp	x8, _EVTHREAD_LOCKTYPE_RECURSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVTHREAD_LOCKTYPE_RECURSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, #0
	bl	_EVTHREAD_ALLOC_LOCK
	tbz	w22, #0, LBB0_1
LBB0_12:
	mov	w0, #0
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EVTHREAD_LOCKTYPE_RECURSIVE,4,2 ; @EVTHREAD_LOCKTYPE_RECURSIVE
.subsections_via_symbols
