	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_thread_at_exit            ## -- Begin function vcos_thread_at_exit
	.p2align	4, 0x90
_vcos_thread_at_exit:                   ## @vcos_thread_at_exit
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_vcos_thread_current
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_VCOS_MAX_EXIT_HANDLERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_VCOS_ENOSPC@GOTPCREL(%rip), %rcx
	testl	%edx, %edx
	jle	LBB0_6
## %bb.2:
	movq	(%rax), %rax
	shlq	$4, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax,%rsi)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$16, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_3
	jmp	LBB0_6
LBB0_7:
	xorl	%edi, %edi
	callq	_vcos_assert
	movq	_VCOS_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, (%rax,%rsi)
	movq	%r14, 8(%rax,%rsi)
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCOS_EINVAL,4,2                ## @VCOS_EINVAL
	.comm	_VCOS_MAX_EXIT_HANDLERS,4,2     ## @VCOS_MAX_EXIT_HANDLERS
	.comm	_VCOS_SUCCESS,4,2               ## @VCOS_SUCCESS
	.comm	_VCOS_ENOSPC,4,2                ## @VCOS_ENOSPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_thread_at_exit            ; -- Begin function vcos_thread_at_exit
	.p2align	2
_vcos_thread_at_exit:                   ; @vcos_thread_at_exit
	.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	x19, x1
	mov	x20, x0
	bl	_vcos_thread_current
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _VCOS_MAX_EXIT_HANDLERS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_MAX_EXIT_HANDLERS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.2:
	ldr	x10, [x0]
Lloh3:
	adrp	x8, _VCOS_ENOSPC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCOS_ENOSPC@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #16
	subs	x9, x9, #1
	b.ne	LBB0_3
	b	LBB0_8
LBB0_5:
	bl	_vcos_assert
Lloh5:
	adrp	x8, _VCOS_EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VCOS_EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x8, _VCOS_ENOSPC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VCOS_ENOSPC@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	stp	x20, x19, [x10]
Lloh9:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VCOS_EINVAL,4,2                ; @VCOS_EINVAL
	.comm	_VCOS_MAX_EXIT_HANDLERS,4,2     ; @VCOS_MAX_EXIT_HANDLERS
	.comm	_VCOS_SUCCESS,4,2               ; @VCOS_SUCCESS
	.comm	_VCOS_ENOSPC,4,2                ; @VCOS_ENOSPC
.subsections_via_symbols
