	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_thread_close             ## -- Begin function __lwp_thread_close
	.p2align	4, 0x90
___lwp_thread_close:                    ## @__lwp_thread_close
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_LWP_STATES_TRANSIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___lwp_thread_setstate
	movq	%r14, %rdi
	callq	___lwp_threadqueue_extractproxy
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	leaq	28(%r14), %rbx
	movq	%rbx, %rdi
	callq	___lwp_wd_isactive
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	___lwp_wd_remove_ticks
LBB0_3:
	callq	__CPU_ISR_Disable
	movq	16(%r14), %r15
	leaq	24(%r14), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	___lwp_threadqueue_dequeue
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rax), %rax
	movq	%r15, (%rax)
	jmp	LBB0_5
LBB0_6:
	movq	$0, 8(%r14)
	movq	_LWP_CPU_BUDGET_ALGO_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	callq	__CPU_ISR_Restore
	movq	__thr_executing@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	___libc_delete_hook
	movq	%r14, %rdi
	callq	___lwp_thread_isallocatedfp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	___lwp_thread_deallocatefp
LBB0_8:
	movq	%r14, %rdi
	callq	___lwp_stack_free
	movl	(%r14), %edi
	movq	%r14, %rsi
	callq	___lwp_objmgr_close
	movl	(%r14), %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___lwp_objmgr_free              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LWP_STATES_TRANSIENT,4,2       ## @LWP_STATES_TRANSIENT
	.comm	_LWP_CPU_BUDGET_ALGO_NONE,4,2   ## @LWP_CPU_BUDGET_ALGO_NONE
	.comm	__thr_executing,4,2             ## @_thr_executing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_thread_close             ; -- Begin function __lwp_thread_close
	.p2align	2
___lwp_thread_close:                    ; @__lwp_thread_close
	.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	x19, x0
Lloh0:
	adrp	x8, _LWP_STATES_TRANSIENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_STATES_TRANSIENT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	___lwp_thread_setstate
	mov	x0, x19
	bl	___lwp_threadqueue_extractproxy
	cbnz	w0, LBB0_3
; %bb.1:
	add	x20, x19, #28
	mov	x0, x20
	bl	___lwp_wd_isactive
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	___lwp_wd_remove_ticks
LBB0_3:
	bl	__CPU_ISR_Disable
	ldr	x21, [x19, #16]
	add	x20, x19, #24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	___lwp_threadqueue_dequeue
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x0, #16]
	str	x21, [x8]
	b	LBB0_4
LBB0_6:
	str	xzr, [x19, #8]
Lloh3:
	adrp	x8, _LWP_CPU_BUDGET_ALGO_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LWP_CPU_BUDGET_ALGO_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	bl	__CPU_ISR_Restore
Lloh6:
	adrp	x8, __thr_executing@GOTPAGE
Lloh7:
	ldr	x8, [x8, __thr_executing@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	___libc_delete_hook
	mov	x0, x19
	bl	___lwp_thread_isallocatedfp
	cbz	x0, LBB0_8
; %bb.7:
	bl	___lwp_thread_deallocatefp
LBB0_8:
	mov	x0, x19
	bl	___lwp_stack_free
	ldr	w0, [x19]
	mov	x1, x19
	bl	___lwp_objmgr_close
	ldr	w0, [x19]
	mov	x1, x19
	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	___lwp_objmgr_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LWP_STATES_TRANSIENT,4,2       ; @LWP_STATES_TRANSIENT
	.comm	_LWP_CPU_BUDGET_ALGO_NONE,4,2   ; @LWP_CPU_BUDGET_ALGO_NONE
	.comm	__thr_executing,4,2             ; @_thr_executing
.subsections_via_symbols
