	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evutil_ersatz_socketpair_      ## -- Begin function evutil_ersatz_socketpair_
	.p2align	4, 0x90
_evutil_ersatz_socketpair_:             ## @evutil_ersatz_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	movq	_AF_INET@GOTPCREL(%rip), %r14
	cmpl	%edi, (%r14)
	jne	LBB0_2
## %bb.4:
	movq	%rcx, %r15
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.6:
	movl	%esi, %ebx
	xorl	%edx, %edx
	callq	_socket
	movl	$-1, %r13d
	testq	%rax, %rax
	js	LBB0_30
## %bb.7:
	leaq	-80(%rbp), %rdi
	movq	%rax, %r12
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	(%r14), %eax
	movl	%eax, -80(%rbp)
	movq	_INADDR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movq	%rax, -64(%rbp)
	movq	$0, -72(%rbp)
	movq	%r12, %rdi
	leaq	-80(%rbp), %rsi
	movl	$24, %edx
	callq	_bind
	cmpl	$-1, %eax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.9:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_listen
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.10:
	movl	(%r14), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_socket
	movq	%rax, %r12
	testq	%rax, %rax
	js	LBB0_14
## %bb.11:
	movl	$24, -44(%rbp)
	leaq	-104(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_getsockname
	cmpl	$-1, %eax
	movq	$-1, %r14
	je	LBB0_15
## %bb.12:
	movq	$-1, %r14
	cmpl	$24, -44(%rbp)
	jne	LBB0_24
## %bb.13:
	leaq	-104(%rbp), %rsi
	movq	%r12, %rdi
	movl	$24, %edx
	callq	_connect
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.16:
	movl	$24, -44(%rbp)
	leaq	-80(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_accept
	movq	%rax, %r14
	testq	%rax, %rax
	js	LBB0_15
## %bb.17:
	cmpl	$24, -44(%rbp)
	jne	LBB0_24
## %bb.18:
	leaq	-104(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_getsockname
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.19:
	cmpl	$24, -44(%rbp)
	jne	LBB0_24
## %bb.20:
	movl	-80(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jne	LBB0_24
## %bb.21:
	movq	-64(%rbp), %rax
	cmpq	-88(%rbp), %rax
	jne	LBB0_24
## %bb.22:
	movq	-72(%rbp), %rax
	cmpq	-96(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_evutil_closesocket
	movq	%r12, (%r15)
	movq	%r14, 8(%r15)
	xorl	%r13d, %r13d
	jmp	LBB0_30
LBB0_2:
	movq	_EAFNOSUPPORT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	callq	_EVUTIL_SET_SOCKET_ERROR
	movl	$-1, %r13d
	jmp	LBB0_30
LBB0_8:
	movq	$-1, %r12
LBB0_14:
	movq	$-1, %r14
LBB0_15:
	xorl	%eax, %eax
	callq	_EVUTIL_SOCKET_ERROR
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_evutil_closesocket
	cmpq	$-1, %r12
	je	LBB0_27
LBB0_26:
	movq	%r12, %rdi
	callq	_evutil_closesocket
LBB0_27:
	cmpq	$-1, %r14
	je	LBB0_29
## %bb.28:
	movq	%r14, %rdi
	callq	_evutil_closesocket
LBB0_29:
	movl	%ebx, %edi
	callq	_EVUTIL_SET_SOCKET_ERROR
LBB0_30:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_ECONNABORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	js	LBB0_15
## %bb.25:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_evutil_closesocket
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_EAFNOSUPPORT,4,2               ## @EAFNOSUPPORT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INADDR_LOOPBACK,4,2            ## @INADDR_LOOPBACK
	.comm	_ECONNABORTED,4,2               ## @ECONNABORTED
	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evutil_ersatz_socketpair_      ; -- Begin function evutil_ersatz_socketpair_
	.p2align	2
_evutil_ersatz_socketpair_:             ; @evutil_ersatz_socketpair_
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	cbnz	w2, LBB0_18
; %bb.1:
Lloh0:
	adrp	x22, _AF_INET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w0
	b.ne	LBB0_18
; %bb.2:
	mov	x21, x3
	cbz	x3, LBB0_19
; %bb.3:
	mov	x20, x1
	mov	w2, #0
	bl	_socket
	tbnz	x0, #63, LBB0_28
; %bb.4:
	mov	x19, x0
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #40]
Lloh2:
	adrp	x8, _INADDR_LOOPBACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INADDR_LOOPBACK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_htonl
	stp	xzr, x0, [sp, #48]
	add	x1, sp, #40
	mov	x0, x19
	mov	w2, #24
	bl	_bind
	cmn	w0, #1
	b.eq	LBB0_20
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_listen
	cmn	w0, #1
	b.eq	LBB0_20
; %bb.6:
	ldr	w0, [x22]
	mov	x1, x20
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbnz	x0, #63, LBB0_21
; %bb.7:
	mov	w8, #24
	str	w8, [sp, #12]
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_getsockname
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.8:
	ldr	w8, [sp, #12]
	cmp	w8, #24
	b.ne	LBB0_30
; %bb.9:
	mov	w22, #24
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #24
	bl	_connect
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.10:
	str	w22, [sp, #12]
	add	x1, sp, #40
	add	x2, sp, #12
	mov	x0, x19
	bl	_accept
	mov	x22, x0
	tbnz	x0, #63, LBB0_22
; %bb.11:
	ldr	w8, [sp, #12]
	cmp	w8, #24
	b.ne	LBB0_31
; %bb.12:
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x20
	bl	_getsockname
	cmn	w0, #1
	b.eq	LBB0_22
; %bb.13:
	ldr	w8, [sp, #12]
	cmp	w8, #24
	b.ne	LBB0_31
; %bb.14:
	ldr	w8, [sp, #40]
	ldr	w9, [sp, #16]
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.15:
	ldr	x8, [sp, #56]
	ldr	x9, [sp, #32]
	cmp	x8, x9
	b.ne	LBB0_31
; %bb.16:
	ldr	x8, [sp, #48]
	ldr	x9, [sp, #24]
	cmp	x8, x9
	b.ne	LBB0_31
; %bb.17:
	mov	x0, x19
	bl	_evutil_closesocket
	mov	w0, #0
	stp	x20, x22, [x21]
	b	LBB0_29
LBB0_18:
Lloh5:
	adrp	x8, _EAFNOSUPPORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAFNOSUPPORT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_27
LBB0_19:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_27
LBB0_20:
	mov	x22, #-1
	mov	x20, #-1
	b	LBB0_22
LBB0_21:
	mov	x22, #-1
LBB0_22:
	bl	_EVUTIL_SOCKET_ERROR
	mov	x21, x0
	mov	x0, x19
	bl	_evutil_closesocket
	cmn	x20, #1
	b.eq	LBB0_24
LBB0_23:
	mov	x0, x20
	bl	_evutil_closesocket
LBB0_24:
	cmn	x22, #1
	b.eq	LBB0_26
; %bb.25:
	mov	x0, x22
	bl	_evutil_closesocket
LBB0_26:
	mov	x0, x21
LBB0_27:
	bl	_EVUTIL_SET_SOCKET_ERROR
LBB0_28:
	mov	w0, #-1
LBB0_29:
	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
	add	sp, sp, #112
	ret
LBB0_30:
	mov	x22, #-1
LBB0_31:
Lloh11:
	adrp	x8, _ECONNABORTED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ECONNABORTED@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	tbnz	w21, #31, LBB0_22
; %bb.32:
	mov	x0, x19
	bl	_evutil_closesocket
	b	LBB0_23
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_EAFNOSUPPORT,4,2               ; @EAFNOSUPPORT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INADDR_LOOPBACK,4,2            ; @INADDR_LOOPBACK
	.comm	_ECONNABORTED,4,2               ; @ECONNABORTED
	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
.subsections_via_symbols
