	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unix_wait_for_peer
_unix_wait_for_peer:                    ## @unix_wait_for_peer
	.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, %r14
	movq	%rdi, %rbx
	callq	_unix_sk
	movq	%rax, %r15
	movq	_wait@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_DEFINE_WAIT
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_prepare_to_wait_exclusive
	movq	_SOCK_DEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sock_flag
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_RCV_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_unix_state_unlock
LBB0_5:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_finish_wait
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_unix_recvq_full
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_unix_state_unlock
	testq	%r12, %r12
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_schedule_timeout
	movq	%rax, %r14
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_SOCK_DEAD,4,2                  ## @SOCK_DEAD
	.comm	_RCV_SHUTDOWN,4,2               ## @RCV_SHUTDOWN
	.no_dead_strip	_unix_wait_for_peer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unix_wait_for_peer
_unix_wait_for_peer:                    ; @unix_wait_for_peer
	.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	x19, x1
	mov	x21, x0
	bl	_unix_sk
	mov	x20, x0
Lloh0:
	adrp	x22, _wait@GOTPAGE
Lloh1:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_DEFINE_WAIT
Lloh2:
	adrp	x8, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_prepare_to_wait_exclusive
Lloh5:
	adrp	x8, _SOCK_DEAD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_DEAD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_sock_flag
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _RCV_SHUTDOWN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RCV_SHUTDOWN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	x0, x21
	bl	_unix_state_unlock
LBB0_3:
Lloh11:
	adrp	x1, _wait@GOTPAGE
Lloh12:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x20
	bl	_finish_wait
	mov	x0, x19
	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_4:
	mov	x0, x21
	bl	_unix_recvq_full
	mov	x22, x0
	mov	x0, x21
	bl	_unix_state_unlock
	cbz	x22, LBB0_3
; %bb.5:
	mov	x0, x19
	bl	_schedule_timeout
	mov	x19, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_SOCK_DEAD,4,2                  ; @SOCK_DEAD
	.comm	_RCV_SHUTDOWN,4,2               ; @RCV_SHUTDOWN
	.no_dead_strip	_unix_wait_for_peer
.subsections_via_symbols
