	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_read_write_gateway      ## -- Begin function server_read_write_gateway
	.p2align	4, 0x90
_server_read_write_gateway:             ## @server_read_write_gateway
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_assert
	movq	8(%rbx), %rdi
	callq	_assert
	movl	(%r14), %eax
	movq	_EVT_FROM_EPOLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.1:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r14)
	movq	_C_NORW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	16(%rbx), %ecx
	movl	%ecx, 16(%rbx)
	movl	4(%r14), %edx
	movq	_EVT_READ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%edx, %esi
	je	LBB0_4
## %bb.2:
	andl	%eax, %esi
	jne	LBB0_4
## %bb.3:
	movq	_C_NORD@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	%ecx, 16(%rbx)
LBB0_4:
	movq	_EVT_WRITE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%edx, %esi
	je	LBB0_7
## %bb.5:
	andl	%eax, %esi
	jne	LBB0_7
## %bb.6:
	movq	_C_NOWR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
LBB0_7:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EVT_FROM_EPOLL,4,2             ## @EVT_FROM_EPOLL
	.comm	_C_NORW,4,2                     ## @C_NORW
	.comm	_EVT_READ,4,2                   ## @EVT_READ
	.comm	_C_NORD,4,2                     ## @C_NORD
	.comm	_EVT_WRITE,4,2                  ## @EVT_WRITE
	.comm	_C_NOWR,4,2                     ## @C_NOWR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_read_write_gateway      ; -- Begin function server_read_write_gateway
	.p2align	2
_server_read_write_gateway:             ; @server_read_write_gateway
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x1
	mov	x0, x1
	bl	_assert
	ldr	x0, [x19, #8]
	bl	_assert
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _EVT_FROM_EPOLL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EVT_FROM_EPOLL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	bic	w9, w8, w9
	str	w9, [x20]
Lloh3:
	adrp	x8, _C_NORW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _C_NORW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w10, [x19, #16]
	bic	w8, w10, w8
	str	w8, [x19, #16]
Lloh6:
	adrp	x11, _EVT_READ@GOTPAGE
Lloh7:
	ldr	x11, [x11, _EVT_READ@GOTPAGEOFF]
	ldr	w10, [x20, #4]
Lloh8:
	ldr	w11, [x11]
	and	w12, w11, w10
	and	w11, w11, w9
	cmp	w12, #0
	ccmp	w11, #0, #0, ne
	b.ne	LBB0_3
; %bb.2:
Lloh9:
	adrp	x11, _C_NORD@GOTPAGE
Lloh10:
	ldr	x11, [x11, _C_NORD@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w8, w11, w8
	str	w8, [x19, #16]
LBB0_3:
Lloh12:
	adrp	x11, _EVT_WRITE@GOTPAGE
Lloh13:
	ldr	x11, [x11, _EVT_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	and	w10, w11, w10
	and	w9, w11, w9
	cmp	w10, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_5
; %bb.4:
Lloh15:
	adrp	x9, _C_NOWR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _C_NOWR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #16]
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EVT_FROM_EPOLL,4,2             ; @EVT_FROM_EPOLL
	.comm	_C_NORW,4,2                     ; @C_NORW
	.comm	_EVT_READ,4,2                   ; @EVT_READ
	.comm	_C_NORD,4,2                     ; @C_NORD
	.comm	_EVT_WRITE,4,2                  ; @EVT_WRITE
	.comm	_C_NOWR,4,2                     ; @C_NOWR
.subsections_via_symbols
