	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_knet_close                     ## -- Begin function knet_close
	.p2align	4, 0x90
_knet_close:                            ## @knet_close
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	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
	movl	(%rdi), %edi
	cmpl	$-1, %edi
	je	LBB0_3
## %bb.2:
	callq	_netclose
LBB0_3:
	movl	4(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_7
## %bb.4:
	movq	8(%rbx), %rax
	movq	_KNF_TYPE_LOCAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	callq	_close
	jmp	LBB0_7
LBB0_6:
	callq	_netclose
LBB0_7:
	movq	56(%rbx), %rdi
	callq	_free
	movq	48(%rbx), %rdi
	callq	_free
	movq	40(%rbx), %rdi
	callq	_free
	movq	32(%rbx), %rdi
	callq	_free
	movq	24(%rbx), %rdi
	callq	_free
	movq	16(%rbx), %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
LBB0_8:
	xorl	%eax, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KNF_TYPE_LOCAL,8,3             ## @KNF_TYPE_LOCAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_knet_close                     ; -- Begin function knet_close
	.p2align	2
_knet_close:                            ; @knet_close
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_8
; %bb.1:
	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	w0, [x0]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
	bl	_netclose
LBB0_3:
	ldr	w0, [x19, #4]
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _KNF_TYPE_LOCAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KNF_TYPE_LOCAL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	bl	_close
	b	LBB0_7
LBB0_6:
	bl	_netclose
LBB0_7:
	ldr	x0, [x19, #56]
	bl	_free
	ldr	x0, [x19, #48]
	bl	_free
	ldr	x0, [x19, #40]
	bl	_free
	ldr	x0, [x19, #32]
	bl	_free
	ldr	x0, [x19, #24]
	bl	_free
	ldr	x0, [x19, #16]
	bl	_free
	mov	x0, x19
	bl	_free
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
LBB0_8:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_KNF_TYPE_LOCAL,8,3             ; @KNF_TYPE_LOCAL
.subsections_via_symbols
