	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eloop_wait_for_read_sock       ## -- Begin function eloop_wait_for_read_sock
	.p2align	4, 0x90
_eloop_wait_for_read_sock:              ## @eloop_wait_for_read_sock
	.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
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_WSACreateEvent
	movq	%rax, %rbx
	movq	_WSA_INVALID_EVENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_1
## %bb.5:
	xorl	%eax, %eax
	callq	_WSAGetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_1:
	movq	_FD_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_WSAEventSelect
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_WSAGetLastError
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	jmp	LBB0_3
LBB0_4:
	movq	_INFINITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WaitForSingleObject
	movl	%r14d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_WSAEventSelect
LBB0_3:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WSACloseEvent                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WSA_INVALID_EVENT,8,3          ## @WSA_INVALID_EVENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WSACreateEvent() failed: %d\n"

	.comm	_FD_READ,4,2                    ## @FD_READ
L_.str.1:                               ## @.str.1
	.asciz	"WSAEventSelect() failed: %d\n"

	.comm	_INFINITE,4,2                   ## @INFINITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eloop_wait_for_read_sock       ; -- Begin function eloop_wait_for_read_sock
	.p2align	2
_eloop_wait_for_read_sock:              ; @eloop_wait_for_read_sock
	.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, x0
	bl	_WSACreateEvent
Lloh0:
	adrp	x8, _WSA_INVALID_EVENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WSA_INVALID_EVENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	bl	_WSAGetLastError
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_printf
LBB0_2:
	mov	x19, x0
Lloh5:
	adrp	x8, _FD_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FD_READ@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_WSAEventSelect
	cbz	w0, LBB0_4
; %bb.3:
	bl	_WSAGetLastError
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _INFINITE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INFINITE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WaitForSingleObject
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_WSAEventSelect
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WSACloseEvent
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_WSA_INVALID_EVENT,8,3          ; @WSA_INVALID_EVENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WSACreateEvent() failed: %d\n"

	.comm	_FD_READ,4,2                    ; @FD_READ
l_.str.1:                               ; @.str.1
	.asciz	"WSAEventSelect() failed: %d\n"

	.comm	_INFINITE,4,2                   ; @INFINITE
.subsections_via_symbols
