	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_socket_stat                    ## -- Begin function socket_stat
	.p2align	4, 0x90
_socket_stat:                           ## @socket_stat
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	$64, %edi
	movq	%rdx, %rsi
	callq	_alloc_buf_gc
	movl	%eax, -24(%rbp)
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	_EVENT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	je	LBB0_3
## %bb.2:
	andl	(%rbx), %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	leaq	-24(%rbp), %rdi
	xorl	%eax, %eax
	callq	_buf_printf
LBB0_3:
	movq	_EVENT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	je	LBB0_6
## %bb.4:
	andl	(%rbx), %eax
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	leaq	-24(%rbp), %rdi
	xorl	%eax, %eax
	callq	_buf_printf
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.5(%rip), %rsi
	leaq	-24(%rbp), %rdi
	xorl	%eax, %eax
	callq	_buf_printf
LBB0_6:
	leaq	-24(%rbp), %rdi
	callq	_BSTR
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVENT_READ,4,2                 ## @EVENT_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"S%s"

L_.str.1:                               ## @.str.1
	.asciz	"R"

L_.str.2:                               ## @.str.2
	.asciz	"r"

	.comm	_EVENT_WRITE,4,2                ## @EVENT_WRITE
L_.str.3:                               ## @.str.3
	.asciz	"W"

L_.str.4:                               ## @.str.4
	.asciz	"w"

L_.str.5:                               ## @.str.5
	.asciz	"S?"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_socket_stat                    ; -- Begin function socket_stat
	.p2align	2
_socket_stat:                           ; @socket_stat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	w0, #64
	mov	x1, x2
	bl	_alloc_buf_gc
	str	w0, [sp, #8]
	cbz	x19, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _EVENT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVENT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.2:
	ldr	w9, [x19]
Lloh3:
	adrp	x10, l_.str.1@PAGE
Lloh4:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh5:
	adrp	x11, l_.str.2@PAGE
Lloh6:
	add	x11, x11, l_.str.2@PAGEOFF
	tst	w9, w8
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_buf_printf
LBB0_3:
Lloh9:
	adrp	x8, _EVENT_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EVENT_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.4:
	ldr	w9, [x19]
Lloh12:
	adrp	x10, l_.str.3@PAGE
Lloh13:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh14:
	adrp	x11, l_.str.4@PAGE
Lloh15:
	add	x11, x11, l_.str.4@PAGEOFF
	tst	w9, w8
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_6:
	add	x0, sp, #8
	bl	_buf_printf
LBB0_7:
	add	x0, sp, #8
	bl	_BSTR
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EVENT_READ,4,2                 ; @EVENT_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"S%s"

l_.str.1:                               ; @.str.1
	.asciz	"R"

l_.str.2:                               ; @.str.2
	.asciz	"r"

	.comm	_EVENT_WRITE,4,2                ; @EVENT_WRITE
l_.str.3:                               ; @.str.3
	.asciz	"W"

l_.str.4:                               ; @.str.4
	.asciz	"w"

l_.str.5:                               ; @.str.5
	.asciz	"S?"

.subsections_via_symbols
