	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm_clear_events                ## -- Begin function sm_clear_events
	.p2align	4, 0x90
_sm_clear_events:                       ## @sm_clear_events
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%edi, %edi
	callq	_alarm
	movq	_SmEventQueue@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_4
## %bb.1:
	movq	_SIGALRM@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_sm_blocksignal
	movl	%eax, %r15d
	movq	(%r12), %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	callq	_ENTER_CRITICAL
	movq	_SmFreeEventList@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, (%rax)
	movq	$0, (%r12)
	xorl	%eax, %eax
	callq	_LEAVE_CRITICAL
	testl	%r15d, %r15d
	je	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r14), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sm_releasesignal               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SmEventQueue,8,3               ## @SmEventQueue
	.comm	_SIGALRM,4,2                    ## @SIGALRM
	.comm	_SmFreeEventList,8,3            ## @SmFreeEventList
	.comm	_ITIMER_REAL,4,2                ## @ITIMER_REAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm_clear_events                ; -- Begin function sm_clear_events
	.p2align	2
_sm_clear_events:                       ; @sm_clear_events
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	w0, #0
	bl	_alarm
Lloh0:
	adrp	x21, _SmEventQueue@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SmEventQueue@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x20, _SIGALRM@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SIGALRM@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_sm_blocksignal
	mov	x19, x0
	ldr	x8, [x21]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.3:
	bl	_ENTER_CRITICAL
Lloh4:
	adrp	x8, _SmFreeEventList@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SmFreeEventList@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x22]
	ldr	x9, [x21]
	str	x9, [x8]
	str	xzr, [x21]
	bl	_LEAVE_CRITICAL
	cbz	w19, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_sm_releasesignal
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SmEventQueue,8,3               ; @SmEventQueue
	.comm	_SIGALRM,4,2                    ; @SIGALRM
	.comm	_SmFreeEventList,8,3            ; @SmFreeEventList
	.comm	_ITIMER_REAL,4,2                ; @ITIMER_REAL
.subsections_via_symbols
