	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsock_open                    ## -- Begin function rtsock_open
	.p2align	4, 0x90
_rtsock_open:                           ## @rtsock_open
	.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
	movq	_PF_ROUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_CAP_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CAP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-20(%rbp), %r14
	movq	%r14, %rdi
	callq	_cap_rights_init
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_caph_rights_limit
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	callq	_close
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_ROUTE,4,2                   ## @PF_ROUTE
	.comm	_SOCK_RAW,4,2                   ## @SOCK_RAW
	.comm	_CAP_EVENT,4,2                  ## @CAP_EVENT
	.comm	_CAP_READ,4,2                   ## @CAP_READ
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsock_open                    ; -- Begin function rtsock_open
	.p2align	2
_rtsock_open:                           ; @rtsock_open
	.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
Lloh0:
	adrp	x8, _PF_ROUTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_ROUTE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_RAW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_RAW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _CAP_EVENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAP_EVENT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _CAP_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAP_READ@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_cap_rights_init
	add	x1, sp, #12
	mov	x0, x19
	bl	_caph_rights_limit
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_close
	mov	w19, #-1
LBB0_3:
	mov	x0, x19
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_ROUTE,4,2                   ; @PF_ROUTE
	.comm	_SOCK_RAW,4,2                   ; @SOCK_RAW
	.comm	_CAP_EVENT,4,2                  ; @CAP_EVENT
	.comm	_CAP_READ,4,2                   ; @CAP_READ
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
