	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NET_Sleep                      ## -- Begin function NET_Sleep
	.p2align	4, 0x90
_NET_Sleep:                             ## @NET_Sleep
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %r15
	movq	(%r15), %r14
	xorl	%ebx, %ebx
	testl	%edi, %edi
	cmovgl	%edi, %ebx
	leaq	-36(%rbp), %rdi
	callq	_FD_ZERO
	movq	_ip_socket@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	cmpq	(%r15), %rdi
	je	LBB0_2
## %bb.1:
	leaq	-36(%rbp), %rsi
	callq	_FD_SET
	movq	(%r12), %r14
	movq	(%r15), %rdi
LBB0_2:
	movq	_ip6_socket@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	cmpq	%rdi, %rax
	je	LBB0_4
## %bb.3:
	leaq	-36(%rbp), %rsi
	movq	%rax, %rdi
	callq	_FD_SET
	movq	(%r12), %rax
	cmpq	%r14, %rax
	movq	%r14, %rcx
	cmovgq	%rax, %rcx
	cmpq	(%r15), %r14
	cmoveq	%rax, %rcx
	movq	%rcx, %r14
LBB0_4:
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, -48(%rbp)
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	subl	%eax, %ebx
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	movl	%eax, -44(%rbp)
	incq	%r14
	leaq	-36(%rbp), %rsi
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_select
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_Com_Printf
	jmp	LBB0_8
LBB0_6:
	testl	%eax, %eax
	jle	LBB0_8
## %bb.7:
	leaq	-36(%rbp), %rdi
	callq	_NET_Event
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_SOCKET,8,3             ## @INVALID_SOCKET
	.comm	_ip_socket,8,3                  ## @ip_socket
	.comm	_ip6_socket,8,3                 ## @ip6_socket
	.comm	_SOCKET_ERROR,4,2               ## @SOCKET_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning: select() syscall failed: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NET_Sleep                      ; -- Begin function NET_Sleep
	.p2align	2
_NET_Sleep:                             ; @NET_Sleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x21, _INVALID_SOCKET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _INVALID_SOCKET@GOTPAGEOFF]
	ldr	x20, [x21]
	cmp	w0, #0
	csel	w19, w0, wzr, gt
	add	x0, sp, #4
	bl	_FD_ZERO
Lloh2:
	adrp	x22, _ip_socket@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ip_socket@GOTPAGEOFF]
	ldr	x0, [x22]
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	add	x1, sp, #4
	bl	_FD_SET
	ldr	x20, [x22]
	ldr	x0, [x21]
LBB0_2:
Lloh4:
	adrp	x22, _ip6_socket@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ip6_socket@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, x0
	b.eq	LBB0_4
; %bb.3:
	add	x1, sp, #4
	mov	x0, x8
	bl	_FD_SET
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x9, x20
	ccmp	x20, x8, #4, le
	csel	x20, x9, x20, eq
LBB0_4:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w19, w8
	lsr	x8, x8, #38
	mov	w9, #1000
	msub	w10, w8, w9, w19
	mul	w9, w10, w9
	stp	w8, w9, [sp, #8]
	add	x0, x20, #1
	add	x1, sp, #4
	add	x4, sp, #8
	mov	x2, #0
	mov	x3, #0
	bl	_select
Lloh6:
	adrp	x8, _SOCKET_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCKET_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.5:
	bl	_NET_ErrorString
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Com_Printf
	b	LBB0_8
LBB0_6:
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.7:
	add	x0, sp, #4
	bl	_NET_Event
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_SOCKET,8,3             ; @INVALID_SOCKET
	.comm	_ip_socket,8,3                  ; @ip_socket
	.comm	_ip6_socket,8,3                 ; @ip6_socket
	.comm	_SOCKET_ERROR,4,2               ; @SOCKET_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning: select() syscall failed: %s\n"

.subsections_via_symbols
