	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_channel_free                   ## -- Begin function channel_free
	.p2align	4, 0x90
_channel_free:                          ## @channel_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_assert
	movq	8(%rbx), %rax
	movq	_CHANNEL_CLOSED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_assert
	leaq	48(%rbx), %rdi
	callq	_STAILQ_EMPTY
	movl	%eax, %edi
	callq	_assert
	movq	_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_LIST_REMOVE
	movq	40(%rbx), %rdi
	callq	_free
	movq	32(%rbx), %rdi
	callq	_free
	movq	24(%rbx), %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	_channel_count@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	decl	%edi
	movl	%edi, (%rax)
	callq	_server_update
	movq	_server_limit@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_log_info
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_CHANNEL_CLOSED,8,3             ## @CHANNEL_CLOSED
	.comm	_next,4,2                       ## @next
	.comm	_channel_count,4,2              ## @channel_count
	.comm	_server_limit,8,3               ## @server_limit
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connection closed, exiting"

	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_channel_free                   ; -- Begin function channel_free
	.p2align	2
_channel_free:                          ; @channel_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	x8, [x0]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _CHANNEL_CLOSED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHANNEL_CLOSED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	add	x0, x19, #48
	bl	_STAILQ_EMPTY
	bl	_assert
Lloh3:
	adrp	x8, _next@GOTPAGE
Lloh4:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LIST_REMOVE
	ldr	x0, [x19, #40]
	bl	_free
	ldr	x0, [x19, #32]
	bl	_free
	ldr	x0, [x19, #24]
	bl	_free
	mov	x0, x19
	bl	_free
Lloh6:
	adrp	x8, _channel_count@GOTPAGE
Lloh7:
	ldr	x8, [x8, _channel_count@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w0, w9, #1
	str	w0, [x8]
	bl	_server_update
Lloh8:
	adrp	x8, _server_limit@GOTPAGE
Lloh9:
	ldr	x8, [x8, _server_limit@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_info
Lloh13:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANNEL_CLOSED,8,3             ; @CHANNEL_CLOSED
	.comm	_next,4,2                       ; @next
	.comm	_channel_count,4,2              ; @channel_count
	.comm	_server_limit,8,3               ; @server_limit
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connection closed, exiting"

	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
.subsections_via_symbols
