	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_swrap_close                    ## -- Begin function swrap_close
	.p2align	4, 0x90
_swrap_close:                           ## @swrap_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	callq	_find_socket_info
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %rbx
	movq	_sockets@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_SWRAP_DLIST_REMOVE
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.2:
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movq	_SWRAP_CLOSE_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_swrap_dump_packet
LBB0_4:
	movl	%r14d, %edi
	callq	_real_close
	movl	%eax, %r14d
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.5:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.6:
	movq	_SWRAP_CLOSE_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_swrap_dump_packet
	movq	_SWRAP_CLOSE_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_swrap_dump_packet
LBB0_7:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_free
LBB0_9:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_free
LBB0_11:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_free
LBB0_13:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_unlink
	movq	(%rbx), %rdi
	callq	_free
LBB0_15:
	movq	%rbx, %rdi
	callq	_free
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_16:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_real_close                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sockets,4,2                    ## @sockets
	.comm	_SWRAP_CLOSE_SEND,4,2           ## @SWRAP_CLOSE_SEND
	.comm	_SWRAP_CLOSE_RECV,4,2           ## @SWRAP_CLOSE_RECV
	.comm	_SWRAP_CLOSE_ACK,4,2            ## @SWRAP_CLOSE_ACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_swrap_close                    ; -- Begin function swrap_close
	.p2align	2
_swrap_close:                           ; @swrap_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	x20, x0
	bl	_find_socket_info
	cbz	x0, LBB0_16
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _sockets@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sockets@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_SWRAP_DLIST_REMOVE
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _SWRAP_CLOSE_SEND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SWRAP_CLOSE_SEND@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x3, #0
	mov	w4, #0
	bl	_swrap_dump_packet
LBB0_4:
	mov	x0, x20
	bl	_real_close
	mov	x20, x0
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _SWRAP_CLOSE_RECV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SWRAP_CLOSE_RECV@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x3, #0
	mov	w4, #0
	bl	_swrap_dump_packet
Lloh9:
	adrp	x8, _SWRAP_CLOSE_ACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SWRAP_CLOSE_ACK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x3, #0
	mov	w4, #0
	bl	_swrap_dump_packet
LBB0_7:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_free
LBB0_9:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_free
LBB0_11:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_free
LBB0_13:
	ldr	x0, [x19]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_unlink
	ldr	x0, [x19]
	bl	_free
LBB0_15:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_real_close
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_sockets,4,2                    ; @sockets
	.comm	_SWRAP_CLOSE_SEND,4,2           ; @SWRAP_CLOSE_SEND
	.comm	_SWRAP_CLOSE_RECV,4,2           ; @SWRAP_CLOSE_RECV
	.comm	_SWRAP_CLOSE_ACK,4,2            ; @SWRAP_CLOSE_ACK
.subsections_via_symbols
