	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evhttp_connection_free         ## -- Begin function evhttp_connection_free
	.p2align	4, 0x90
_evhttp_connection_free:                ## @evhttp_connection_free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	cmpl	$-1, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_evhttp_connected
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	56(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	52(%r14), %esi
	movq	%r14, %rdi
	callq	*%rax
LBB0_4:
	leaq	48(%r14), %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_evhttp_request_free_
	jmp	LBB0_6
LBB0_7:
	movq	40(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	movq	_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_TAILQ_REMOVE
LBB0_9:
	leaq	36(%r14), %rbx
	movq	%rbx, %rdi
	callq	_event_initialized
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_event_del
	movq	%rbx, %rdi
	callq	_event_debug_unassign
LBB0_11:
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_bufferevent_free
LBB0_13:
	movq	%r14, %rdi
	callq	_get_deferred_queue
	leaq	32(%r14), %rsi
	movl	%eax, %edi
	callq	_event_deferred_cb_cancel_
	cmpl	$-1, (%r14)
	jne	LBB0_15
## %bb.14:
	movq	24(%r14), %rdi
	callq	_bufferevent_getfd
	movl	%eax, (%r14)
	cmpl	$-1, %eax
	je	LBB0_17
LBB0_15:
	movq	24(%r14), %rdi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_bufferevent_disable
	movl	(%r14), %edi
	movq	_EVUTIL_SHUT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shutdown
	movq	24(%r14), %rdi
	callq	_bufferevent_get_options_
	movq	_BEV_OPT_CLOSE_ON_FREE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
## %bb.16:
	movl	(%r14), %edi
	callq	_evutil_closesocket
LBB0_17:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	callq	_mm_free
LBB0_19:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_mm_free
LBB0_21:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mm_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_next,4,2                       ## @next
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_EVUTIL_SHUT_WR,4,2             ## @EVUTIL_SHUT_WR
	.comm	_BEV_OPT_CLOSE_ON_FREE,4,2      ## @BEV_OPT_CLOSE_ON_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evhttp_connection_free         ; -- Begin function evhttp_connection_free
	.p2align	2
_evhttp_connection_free:                ; @evhttp_connection_free
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_evhttp_connected
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w1, [x19, #52]
	mov	x0, x19
	blr	x8
LBB0_4:
	add	x20, x19, #48
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_7
; %bb.5:
	mov	x1, x0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_evhttp_request_free_
	mov	x0, x20
	bl	_TAILQ_FIRST
	mov	x1, x0
	cbnz	x0, LBB0_6
LBB0_7:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_9
; %bb.8:
Lloh0:
	adrp	x8, _next@GOTPAGE
Lloh1:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_TAILQ_REMOVE
LBB0_9:
	add	x20, x19, #36
	mov	x0, x20
	bl	_event_initialized
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_event_del
	mov	x0, x20
	bl	_event_debug_unassign
LBB0_11:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_bufferevent_free
LBB0_13:
	mov	x0, x19
	bl	_get_deferred_queue
	add	x1, x19, #32
	bl	_event_deferred_cb_cancel_
	ldr	w8, [x19]
	cmn	w8, #1
	b.ne	LBB0_15
; %bb.14:
	ldr	x0, [x19, #24]
	bl	_bufferevent_getfd
	str	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_16
LBB0_15:
Lloh3:
	adrp	x8, _EV_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
	ldr	x0, [x19, #24]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EV_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EV_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_bufferevent_disable
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _EVUTIL_SHUT_WR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EVUTIL_SHUT_WR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_shutdown
	ldr	x0, [x19, #24]
	bl	_bufferevent_get_options_
Lloh12:
	adrp	x8, _BEV_OPT_CLOSE_ON_FREE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BEV_OPT_CLOSE_ON_FREE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_21
LBB0_16:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_18
LBB0_17:
	bl	_mm_free
LBB0_18:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_mm_free
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mm_free
LBB0_21:
	ldr	w0, [x19]
	bl	_evutil_closesocket
	ldr	x0, [x19, #16]
	cbnz	x0, LBB0_17
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_next,4,2                       ; @next
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_EVUTIL_SHUT_WR,4,2             ; @EVUTIL_SHUT_WR
	.comm	_BEV_OPT_CLOSE_ON_FREE,4,2      ; @BEV_OPT_CLOSE_ON_FREE
.subsections_via_symbols
