	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vt_waitactive                  ## -- Begin function vt_waitactive
	.p2align	4, 0x90
_vt_waitactive:                         ## @vt_waitactive
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_fg_console@GOTPCREL(%rip), %r12
	movq	_VT_EVENT_SWITCH@GOTPCREL(%rip), %r13
	leaq	-56(%rbp), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	incl	%eax
	cmpl	%r14d, %eax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	callq	_vt_event_wait
	cmpq	$0, -56(%rbp)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%r14d, -48(%rbp)
	jne	LBB0_1
	jmp	LBB0_5
LBB0_3:
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fg_console,4,2                 ## @fg_console
	.comm	_VT_EVENT_SWITCH,4,2            ## @VT_EVENT_SWITCH
	.comm	_EINTR,4,2                      ## @EINTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vt_waitactive                  ; -- Begin function vt_waitactive
	.p2align	2
_vt_waitactive:                         ; @vt_waitactive
	.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	x19, x0
Lloh0:
	adrp	x20, _fg_console@GOTPAGE
Lloh1:
	ldr	x20, [x20, _fg_console@GOTPAGEOFF]
Lloh2:
	adrp	x21, _VT_EVENT_SWITCH@GOTPAGE
Lloh3:
	ldr	x21, [x21, _VT_EVENT_SWITCH@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	add	w8, w8, #1
	cmp	w8, w19
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x21]
	str	w8, [sp, #12]
	mov	x0, sp
	bl	_vt_event_wait
	ldr	x8, [sp]
	cbz	x8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #8]
	cmp	w8, w19
	b.ne	LBB0_1
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _EINTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_fg_console,4,2                 ; @fg_console
	.comm	_VT_EVENT_SWITCH,4,2            ; @VT_EVENT_SWITCH
	.comm	_EINTR,4,2                      ; @EINTR
.subsections_via_symbols
