	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __rap_close
___rap_close:                           ## @__rap_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_RIORAP_IS_VALID
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rbx, %rdi
	callq	_RIORAP_FD
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_11
## %bb.3:
	cmpl	$-1, (%rbx)
	je	LBB0_11
## %bb.4:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_r_socket_close
LBB0_6:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	callq	_r_socket_close
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_eprintf
	movl	$-1, %r15d
	jmp	LBB0_11
LBB0_7:
	movl	$-1, %r15d
LBB0_9:
	movq	%r14, %rdi
	callq	_R_FREE
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"__rap_close: fdesc is not a r_io_rap plugin\n"

	.no_dead_strip	___rap_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __rap_close
___rap_close:                           ; @__rap_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	_RIORAP_IS_VALID
	cbz	x0, LBB0_8
; %bb.1:
	mov	x0, x20
	bl	_RIORAP_FD
	cbz	x0, LBB0_9
; %bb.2:
	ldr	x19, [x20, #8]
	cbz	x19, LBB0_9
; %bb.3:
	ldr	w8, [x20]
	cmn	w8, #1
	b.eq	LBB0_9
; %bb.4:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_r_socket_close
LBB0_6:
	ldr	x0, [x19]
	cbz	x0, LBB0_11
; %bb.7:
	bl	_r_socket_close
	mov	x20, x0
	b	LBB0_12
LBB0_8:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_eprintf
LBB0_9:
	mov	w20, #-1
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	w20, #-1
LBB0_12:
	mov	x0, x19
	bl	_R_FREE
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"__rap_close: fdesc is not a r_io_rap plugin\n"

	.no_dead_strip	___rap_close
.subsections_via_symbols
