	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getsocket
_getsocket:                             ## @getsocket
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	cmpl	$0, (%rdi)
	js	LBB0_1
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %edx
	movq	%rdi, %r14
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_socket
	movl	$-1, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	%eax, %r15d
	movq	_CAP_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CAP_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %r12
	movq	%r12, %rdi
	callq	_cap_rights_init
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_caph_rights_limit
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	%r15d, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_SOCK_RAW,4,2                   ## @SOCK_RAW
	.comm	_CAP_CONNECT,4,2                ## @CAP_CONNECT
	.comm	_CAP_SEND,4,2                   ## @CAP_SEND
	.no_dead_strip	_getsocket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getsocket
_getsocket:                             ; @getsocket
	.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
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	mov	x2, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_RAW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_RAW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_socket
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh6:
	adrp	x8, _CAP_CONNECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAP_CONNECT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _CAP_SEND@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAP_SEND@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_cap_rights_init
	add	x1, sp, #12
	mov	x0, x20
	bl	_caph_rights_limit
	cbz	x0, LBB0_5
LBB0_4:
	mov	w0, #-1
	b	LBB0_6
LBB0_5:
	str	w20, [x19]
LBB0_6:
	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	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_SOCK_RAW,4,2                   ; @SOCK_RAW
	.comm	_CAP_CONNECT,4,2                ; @CAP_CONNECT
	.comm	_CAP_SEND,4,2                   ; @CAP_SEND
	.no_dead_strip	_getsocket
.subsections_via_symbols
