	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpc_pipe_open
_rpc_pipe_open:                         ## @rpc_pipe_open
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_RPC_I
	movq	%rax, %r12
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	cmpq	$0, (%r12)
	jne	LBB0_5
## %bb.2:
	cmpq	$0, 8(%r12)
	je	LBB0_3
LBB0_5:
	movl	(%r15), %eax
	movq	_FMODE_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	incq	(%r12)
LBB0_7:
	movq	_FMODE_WRITE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	incq	8(%r12)
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.no_dead_strip	_rpc_pipe_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpc_pipe_open
_rpc_pipe_open:                         ; @rpc_pipe_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	bl	_RPC_I
	mov	x20, x0
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	x9, [x20]
	cbnz	x9, LBB0_3
; %bb.2:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_10
LBB0_3:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _FMODE_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FMODE_READ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x9, [x20]
	add	x9, x9, #1
	str	x9, [x20]
LBB0_5:
Lloh6:
	adrp	x9, _FMODE_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FMODE_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	w22, #0
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
	b	LBB0_9
LBB0_7:
	neg	w22, w22
	b	LBB0_9
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.11:
	mov	x0, x19
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_9
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.no_dead_strip	_rpc_pipe_open
.subsections_via_symbols
