	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function evhttp_connection_done
_evhttp_connection_done:                ## @evhttp_connection_done
	.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, %r15
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movq	_EVHTTP_CON_OUTGOING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.1:
	movq	_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movq	$0, 24(%rbx)
	movq	_EVCON_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	(%rbx), %edi
	movl	20(%rbx), %esi
	callq	_evhttp_is_connection_close
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	movl	16(%rbx), %esi
	callq	_evhttp_is_connection_close
	testq	%rax, %rax
	je	LBB0_5
LBB0_3:
	movq	%r15, %rdi
	callq	_evhttp_connection_reset_
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_4
LBB0_6:
	movq	%r15, %rdi
	callq	_evhttp_connected
	movq	%r15, %rdi
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:
	callq	_evhttp_request_dispatch
	jmp	LBB0_11
LBB0_9:
	movq	_EVCON_WRITING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	8(%rbx), %rax
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_4:
	movq	_EVHTTP_CON_AUTOFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, (%r15)
	setne	%r12b
	jmp	LBB0_12
LBB0_7:
	callq	_evhttp_connection_connect_
LBB0_11:
	xorl	%r12d, %r12d
LBB0_12:
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	_EVHTTP_USER_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_13
## %bb.14:
	testl	%r12d, %r12d
	jne	LBB0_15
	jmp	LBB0_16
LBB0_13:
	movq	%rbx, %rdi
	callq	_evhttp_request_free
	testl	%r12d, %r12d
	je	LBB0_16
LBB0_15:
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_17
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evhttp_connection_free         ## TAILCALL
LBB0_5:
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	jne	LBB0_6
## %bb.8:
	movq	%r15, %rdi
	callq	_evhttp_connection_start_detectclose
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EVHTTP_CON_OUTGOING,4,2        ## @EVHTTP_CON_OUTGOING
	.comm	_next,4,2                       ## @next
	.comm	_EVCON_IDLE,4,2                 ## @EVCON_IDLE
	.comm	_EVHTTP_CON_AUTOFREE,4,2        ## @EVHTTP_CON_AUTOFREE
	.comm	_EVCON_WRITING,4,2              ## @EVCON_WRITING
	.comm	_EVHTTP_USER_OWNED,4,2          ## @EVHTTP_USER_OWNED
	.no_dead_strip	_evhttp_connection_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function evhttp_connection_done
_evhttp_connection_done:                ; @evhttp_connection_done
	.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, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_TAILQ_FIRST
	mov	x21, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _EVHTTP_CON_OUTGOING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EVHTTP_CON_OUTGOING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _next@GOTPAGE
Lloh4:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_TAILQ_REMOVE
	str	xzr, [x21, #24]
Lloh6:
	adrp	x8, _EVCON_IDLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EVCON_IDLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	w0, [x21]
	ldr	w1, [x21, #20]
	bl	_evhttp_is_connection_close
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x21]
	ldr	w1, [x21, #16]
	bl	_evhttp_is_connection_close
	cbz	x0, LBB0_16
LBB0_3:
	mov	x0, x19
	bl	_evhttp_connection_reset_
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_evhttp_connected
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_evhttp_request_dispatch
	b	LBB0_9
LBB0_6:
Lloh9:
	adrp	x8, _EVCON_WRITING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EVCON_WRITING@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	x2, [x21, #8]
	ldr	w1, [x21, #4]
	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
	br	x2
LBB0_7:
	ldr	w8, [x19]
Lloh12:
	adrp	x9, _EVHTTP_CON_AUTOFREE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EVHTTP_CON_AUTOFREE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w22, ne
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_evhttp_connection_connect_
LBB0_9:
	mov	w22, #0
LBB0_10:
	ldr	x8, [x21, #8]
	ldr	w1, [x21, #4]
	mov	x0, x21
	blr	x8
	ldr	w8, [x21]
Lloh15:
	adrp	x9, _EVHTTP_USER_OWNED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EVHTTP_USER_OWNED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	cbnz	w22, LBB0_13
	b	LBB0_14
LBB0_12:
	mov	x0, x21
	bl	_evhttp_request_free
	cbz	w22, LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_15
LBB0_14:
	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
LBB0_15:
	mov	x0, x19
	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
	b	_evhttp_connection_free
LBB0_16:
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbnz	x0, LBB0_4
; %bb.17:
	mov	x0, x19
	bl	_evhttp_connection_start_detectclose
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EVHTTP_CON_OUTGOING,4,2        ; @EVHTTP_CON_OUTGOING
	.comm	_next,4,2                       ; @next
	.comm	_EVCON_IDLE,4,2                 ; @EVCON_IDLE
	.comm	_EVHTTP_CON_AUTOFREE,4,2        ; @EVHTTP_CON_AUTOFREE
	.comm	_EVCON_WRITING,4,2              ; @EVCON_WRITING
	.comm	_EVHTTP_USER_OWNED,4,2          ; @EVHTTP_USER_OWNED
	.no_dead_strip	_evhttp_connection_done
.subsections_via_symbols
