	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_session_close                  ## -- Begin function session_close
	.p2align	4, 0x90
_session_close:                         ## @session_close
	.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
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 48(%rbx)
	setne	%dil
	callq	_assert
	movq	_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_LIST_REMOVE
	movl	(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_3
## %bb.1:
	movq	48(%rbx), %rsi
	addq	$4, %rsi
	callq	_FD_CLR
	movl	(%rbx), %edi
	movq	48(%rbx), %rsi
	addq	$8, %rsi
	callq	_FD_CLR
	movl	(%rbx), %edi
	callq	_close
	movq	48(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	(%rbx), %ecx
	jne	LBB0_3
## %bb.2:
	decl	%ecx
	movl	%ecx, (%rax)
LBB0_3:
	movl	4(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_6
## %bb.4:
	movq	48(%rbx), %rsi
	addq	$4, %rsi
	callq	_FD_CLR
	movl	4(%rbx), %edi
	movq	48(%rbx), %rsi
	addq	$8, %rsi
	callq	_FD_CLR
	movl	4(%rbx), %edi
	callq	_close
	movq	48(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	4(%rbx), %ecx
	jne	LBB0_6
## %bb.5:
	decl	%ecx
	movl	%ecx, (%rax)
LBB0_6:
	movl	8(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_9
## %bb.7:
	movq	48(%rbx), %rsi
	addq	$4, %rsi
	callq	_FD_CLR
	movl	8(%rbx), %edi
	callq	_close
	movq	48(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	8(%rbx), %ecx
	jne	LBB0_9
## %bb.8:
	decl	%ecx
	movl	%ecx, (%rax)
LBB0_9:
	movl	12(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_11
## %bb.10:
	callq	_close
LBB0_11:
	movl	16(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_14
## %bb.12:
	movq	48(%rbx), %rsi
	addq	$4, %rsi
	callq	_FD_CLR
	movl	16(%rbx), %edi
	callq	_close
	movq	48(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	16(%rbx), %ecx
	jne	LBB0_14
## %bb.13:
	decl	%ecx
	movl	%ecx, (%rax)
LBB0_14:
	movq	40(%rbx), %rdi
	callq	_free
	movq	32(%rbx), %rdi
	callq	_free
	movq	24(%rbx), %rdi
	callq	_free
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_next,4,2                       ## @next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_session_close                  ; -- Begin function session_close
	.p2align	2
_session_close:                         ; @session_close
	.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
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #48]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x8, _next@GOTPAGE
Lloh1:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LIST_REMOVE
	ldr	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x19, #48]
	add	x1, x8, #4
	bl	_FD_CLR
	ldr	w0, [x19]
	ldr	x8, [x19, #48]
	add	x1, x8, #8
	bl	_FD_CLR
	ldr	w0, [x19]
	bl	_close
	ldr	x8, [x19, #48]
	ldr	w9, [x8]
	ldr	w10, [x19]
	cmp	w9, w10
	b.ne	LBB0_3
; %bb.2:
	sub	w9, w9, #1
	str	w9, [x8]
LBB0_3:
	ldr	w0, [x19, #4]
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x19, #48]
	add	x1, x8, #4
	bl	_FD_CLR
	ldr	w0, [x19, #4]
	ldr	x8, [x19, #48]
	add	x1, x8, #8
	bl	_FD_CLR
	ldr	w0, [x19, #4]
	bl	_close
	ldr	x8, [x19, #48]
	ldr	w9, [x8]
	ldr	w10, [x19, #4]
	cmp	w9, w10
	b.ne	LBB0_6
; %bb.5:
	sub	w9, w9, #1
	str	w9, [x8]
LBB0_6:
	ldr	w0, [x19, #8]
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.7:
	ldr	x8, [x19, #48]
	add	x1, x8, #4
	bl	_FD_CLR
	ldr	w0, [x19, #8]
	bl	_close
	ldr	x8, [x19, #48]
	ldr	w9, [x8]
	ldr	w10, [x19, #8]
	cmp	w9, w10
	b.ne	LBB0_9
; %bb.8:
	sub	w9, w9, #1
	str	w9, [x8]
LBB0_9:
	ldr	w0, [x19, #12]
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:
	bl	_close
LBB0_11:
	ldr	w0, [x19, #16]
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.12:
	ldr	x8, [x19, #48]
	add	x1, x8, #4
	bl	_FD_CLR
	ldr	w0, [x19, #16]
	bl	_close
	ldr	x8, [x19, #48]
	ldr	w9, [x8]
	ldr	w10, [x19, #16]
	cmp	w9, w10
	b.ne	LBB0_14
; %bb.13:
	sub	w9, w9, #1
	str	w9, [x8]
LBB0_14:
	ldr	x0, [x19, #40]
	bl	_free
	ldr	x0, [x19, #32]
	bl	_free
	ldr	x0, [x19, #24]
	bl	_free
	mov	x0, x19
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_next,4,2                       ; @next
.subsections_via_symbols
