	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_socketpair                 ## -- Begin function sys_socketpair
	.p2align	4, 0x90
_sys_socketpair:                        ## @sys_socketpair
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_STRACE
	movl	%ebx, %edi
	callq	_sock_family_to_real
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_sock_type_to_real
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	leaq	-56(%rbp), %rcx
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_socketpair
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_peer_lock@GOTPCREL(%rip), %rdi
	callq	_lock
	movl	-56(%rbp), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_sock_fd_create
	movl	%eax, %r15d
	movl	%eax, -64(%rbp)
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	-52(%rbp), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_sock_fd_create
	movl	%eax, %ebx
	movl	%eax, -60(%rbp)
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%r15d, %edi
	callq	_f_get
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_f_get
	movq	%rax, (%r15)
	movq	%r15, (%rax)
	movq	_peer_lock@GOTPCREL(%rip), %rdi
	callq	_unlock
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-64(%rbp), %rsi
	movl	%r14d, %edi
	callq	_user_put
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	-60(%rbp), %edi
	callq	_sys_close
	movl	-64(%rbp), %r15d
	jmp	LBB0_12
LBB0_1:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_14
LBB0_4:
	xorl	%eax, %eax
	callq	_errno_map
	movl	%eax, %r15d
	jmp	LBB0_14
LBB0_6:
	movq	_peer_lock@GOTPCREL(%rip), %rdi
	callq	_unlock
	jmp	LBB0_13
LBB0_8:
	movq	_peer_lock@GOTPCREL(%rip), %rdi
	callq	_unlock
LBB0_12:
	movl	%r15d, %edi
	callq	_sys_close
	movl	%ebx, %r15d
LBB0_13:
	movl	-56(%rbp), %edi
	callq	_close
	movl	-52(%rbp), %edi
	callq	_close
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_STRACE
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socketpair(%d, %d, %d, 0x%x)"

	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	_peer_lock,4,2                  ## @peer_lock
	.comm	__EFAULT,4,2                    ## @_EFAULT
L_.str.1:                               ## @.str.1
	.asciz	" [%d, %d]"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_socketpair                 ; -- Begin function sys_socketpair
	.p2align	2
_sys_socketpair:                        ; @sys_socketpair
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	stp	x21, x19, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	bl	_STRACE
	mov	x0, x23
	bl	_sock_family_to_real
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	bl	_sock_type_to_real
	tbnz	w0, #31, LBB0_7
; %bb.2:
	add	x3, sp, #32
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_socketpair
	tbnz	w0, #31, LBB0_8
; %bb.3:
Lloh5:
	adrp	x0, _peer_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _peer_lock@GOTPAGEOFF]
	bl	_lock
	ldr	w0, [sp, #32]
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	bl	_sock_fd_create
	mov	x20, x0
	str	w0, [sp, #24]
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w0, [sp, #36]
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	bl	_sock_fd_create
	mov	x21, x0
	str	w0, [sp, #28]
	tbnz	w0, #31, LBB0_10
; %bb.5:
	mov	x0, x20
	bl	_f_get
	mov	x20, x0
	mov	x0, x21
	bl	_f_get
	str	x0, [x20]
	str	x20, [x0]
Lloh7:
	adrp	x0, _peer_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _peer_lock@GOTPAGEOFF]
	bl	_unlock
Lloh9:
	adrp	x8, __EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	add	x1, sp, #24
	mov	x0, x19
	bl	_user_put
	cbz	x0, LBB0_15
; %bb.6:
	ldr	w0, [sp, #28]
	bl	_sys_close
	ldr	w20, [sp, #24]
	b	LBB0_11
LBB0_7:
Lloh12:
	adrp	x8, __EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_8:
	bl	_errno_map
	mov	x20, x0
	b	LBB0_13
LBB0_9:
Lloh15:
	adrp	x0, _peer_lock@GOTPAGE
Lloh16:
	ldr	x0, [x0, _peer_lock@GOTPAGEOFF]
	bl	_unlock
	b	LBB0_12
LBB0_10:
Lloh17:
	adrp	x0, _peer_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _peer_lock@GOTPAGEOFF]
	bl	_unlock
LBB0_11:
	mov	x0, x20
	bl	_sys_close
	mov	x20, x21
LBB0_12:
	ldr	w0, [sp, #32]
	bl	_close
	ldr	w0, [sp, #36]
	bl	_close
LBB0_13:
	ldr	x8, [sp, #40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	ldp	w1, w2, [sp, #24]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_STRACE
	mov	w20, #0
	b	LBB0_13
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socketpair(%d, %d, %d, 0x%x)"

	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	_peer_lock,4,2                  ; @peer_lock
	.comm	__EFAULT,4,2                    ; @_EFAULT
l_.str.1:                               ; @.str.1
	.asciz	" [%d, %d]"

.subsections_via_symbols
