	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socket_wait_for_data
_socket_wait_for_data:                  ## @socket_wait_for_data
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_INFINITE_TIMEOUT_MS@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	cmpl	%esi, (%rcx)
	je	LBB0_5
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r15
	leaq	-36(%rbp), %r14
	movq	%r14, %rdi
	callq	_FD_ZERO
	movq	8(%r15), %rdi
	movq	%r14, %rsi
	callq	_FD_SET
	movslq	%ebx, %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, -32(%rbp)
	imull	$-1000, %ecx, %ecx              ## imm = 0xFC18
	addl	%ecx, %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, -28(%rbp)
	movq	8(%r15), %rdi
	incq	%rdi
	leaq	-32(%rbp), %r8
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_select
	movl	%eax, %ebx
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_vc_container_net_private_last_error
	jmp	LBB0_4
LBB0_3:
	movq	_VC_CONTAINER_NET_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movl	%eax, (%r15)
	xorl	%eax, %eax
	cmpl	$1, %ebx
	sete	%al
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INFINITE_TIMEOUT_MS,4,2        ## @INFINITE_TIMEOUT_MS
	.comm	_SOCKET_ERROR,4,2               ## @SOCKET_ERROR
	.comm	_VC_CONTAINER_NET_SUCCESS,4,2   ## @VC_CONTAINER_NET_SUCCESS
	.no_dead_strip	_socket_wait_for_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socket_wait_for_data
_socket_wait_for_data:                  ; @socket_wait_for_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _INFINITE_TIMEOUT_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INFINITE_TIMEOUT_MS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_6
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #12
	bl	_FD_ZERO
	ldr	x0, [x19, #8]
	add	x1, sp, #12
	bl	_FD_SET
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w20, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	mov	w9, #-1000
	madd	w9, w8, w9, w20
	mov	w10, #1000
	mul	w9, w9, w10
	stp	w8, w9, [sp]
	ldr	x8, [x19, #8]
	add	x0, x8, #1
	add	x1, sp, #12
	mov	x4, sp
	mov	x2, #0
	mov	x3, #0
	bl	_select
	mov	x20, x0
Lloh3:
	adrp	x8, _SOCKET_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCKET_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	bl	_vc_container_net_private_last_error
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _VC_CONTAINER_NET_SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC_CONTAINER_NET_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_5:
	str	w0, [x19]
	cmp	w20, #1
	cset	w0, eq
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INFINITE_TIMEOUT_MS,4,2        ; @INFINITE_TIMEOUT_MS
	.comm	_SOCKET_ERROR,4,2               ; @SOCKET_ERROR
	.comm	_VC_CONTAINER_NET_SUCCESS,4,2   ; @VC_CONTAINER_NET_SUCCESS
	.no_dead_strip	_socket_wait_for_data
.subsections_via_symbols
