	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_for_async                 ## -- Begin function wait_for_async
	.p2align	4, 0x90
_wait_for_async:                        ## @wait_for_async
	.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	%rdi, %r14
	leaq	-48(%rbp), %rdx
	xorl	%esi, %esi
	callq	_SSL_get_all_async_fds
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.2:
	shll	$3, %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_app_malloc
	movq	%rax, %r15
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_SSL_get_all_async_fds
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	leaq	-36(%rbp), %rdi
	callq	_FD_ZERO
	cmpq	$0, -48(%rbp)
	je	LBB0_4
## %bb.5:
	xorl	%ebx, %ebx
	leaq	-36(%rbp), %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,8), %edi
	leal	1(%rdi), %eax
	cmpl	%edi, %r12d
	cmovlel	%eax, %r12d
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%r14, %rsi
	callq	_openssl_fdset
	incq	%rbx
	cmpq	-48(%rbp), %rbx
	jb	LBB0_6
	jmp	LBB0_7
LBB0_4:
	xorl	%r12d, %r12d
LBB0_7:
	leaq	-36(%rbp), %rsi
	movl	%r12d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_select
LBB0_8:
	movq	%r15, %rdi
	callq	_OPENSSL_free
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocate async fds"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_for_async                 ; -- Begin function wait_for_async
	.p2align	2
_wait_for_async:                        ; @wait_for_async
	.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
	mov	x20, x0
	mov	x2, sp
	mov	x1, #0
	bl	_SSL_get_all_async_fds
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x8, [sp]
	cbz	x8, LBB0_9
; %bb.2:
	lsl	w0, w8, #3
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_app_malloc
	mov	x19, x0
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_SSL_get_all_async_fds
	cbz	w0, LBB0_8
; %bb.3:
	add	x0, sp, #12
	bl	_FD_ZERO
	ldr	x8, [sp]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x21, #0
	mov	w20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, x21, lsl #3]
	cmp	w20, w0
	csinc	w20, w20, w0, gt
	add	x1, sp, #12
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_openssl_fdset
	add	x21, x21, #1
	ldr	x8, [sp]
	cmp	x21, x8
	b.lo	LBB0_5
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_select
LBB0_8:
	mov	x0, x19
	bl	_OPENSSL_free
LBB0_9:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocate async fds"

.subsections_via_symbols
