	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_wrap
_tls_wrap:                              ## @tls_wrap
	.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
	movq	%rdx, %r14
	movl	%esi, %r15d
	movl	%edi, %r12d
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	leaq	-40(%rbp), %rcx
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_proto_wrap
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	-40(%rbp), %rax
	movq	%rax, 24(%rbx)
	movq	$0, 16(%rbx)
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	movl	%eax, (%rbx)
	jne	LBB0_5
## %bb.6:
	movq	_TLS_SIDE_SERVER_WORK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_8
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_8
LBB0_5:
	movq	_TLS_SIDE_CLIENT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_TLS_CTX_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, (%r14)
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socketpair"

	.comm	_TLS_SIDE_CLIENT,4,2            ## @TLS_SIDE_CLIENT
	.comm	_TLS_SIDE_SERVER_WORK,4,2       ## @TLS_SIDE_SERVER_WORK
	.comm	_TLS_CTX_MAGIC,4,2              ## @TLS_CTX_MAGIC
	.no_dead_strip	_tls_wrap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_wrap
_tls_wrap:                              ; @tls_wrap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	x1, x22
	mov	x2, x21
	bl	_proto_wrap
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.2:
	mov	w21, #0
	ldr	x8, [sp, #8]
	stp	xzr, x8, [x20, #16]
	cmp	w22, #0
	cset	w8, eq
	str	w8, [x20]
Lloh2:
	adrp	x8, _TLS_SIDE_CLIENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TLS_SIDE_CLIENT@GOTPAGEOFF]
Lloh4:
	adrp	x9, _TLS_SIDE_SERVER_WORK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _TLS_SIDE_SERVER_WORK@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TLS_CTX_MAGIC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TLS_CTX_MAGIC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #4]
	str	x20, [x19]
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_free
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socketpair"

	.comm	_TLS_SIDE_CLIENT,4,2            ; @TLS_SIDE_CLIENT
	.comm	_TLS_SIDE_SERVER_WORK,4,2       ; @TLS_SIDE_SERVER_WORK
	.comm	_TLS_CTX_MAGIC,4,2              ; @TLS_CTX_MAGIC
	.no_dead_strip	_tls_wrap
.subsections_via_symbols
