	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function del_tthread
_del_tthread:                           ## @del_tthread
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	_thread_head@GOTPCREL(%rip), %r11
	movq	(%r11), %r9
	testq	%r9, %r9
	jle	LBB0_4
## %bb.1:
	movq	8(%r11), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.2:
	cmpq	%rdi, (%rax)
	jne	LBB0_15
## %bb.3:
	xorl	%esi, %esi
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_15:
	movq	%rax, %rdx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%rdx), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_16 Depth=1
	movq	%rdx, %rsi
	movq	%rax, %rdx
	cmpq	%rdi, (%rax)
	jne	LBB0_16
LBB0_6:
	movq	24(%rax), %r8
	testq	%r8, %r8
	je	LBB0_12
## %bb.7:
	movq	16(%r11), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.8:
	xorl	%edx, %edx
	leaq	16(%r11), %r10
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	32(%rdi), %rdi
	movq	%rcx, %rdx
	testq	%rdi, %rdi
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %rcx
	cmpq	%rax, %rdi
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	32(%rdx), %rcx
	testq	%rdx, %rdx
	movq	16(%rax), %rbx
	cmoveq	%r10, %rcx
	movq	%rbx, (%rcx)
	movq	%rdx, %rcx
	jmp	LBB0_11
LBB0_12:
	decq	%r9
	movq	%r9, (%r11)
	leaq	32(%rsi), %rcx
	addq	$8, %r11
	testq	%rsi, %rsi
	cmovneq	%rcx, %r11
	movq	32(%rax), %rcx
	movq	%rcx, (%r11)
	movq	_deleted_threads@GOTPCREL(%rip), %rcx
	movq	16(%rcx), %rdx
	movq	%rdx, 32(%rax)
	incl	8(%rcx)
	movq	%rax, 16(%rcx)
	testq	%r8, %r8
	je	LBB0_14
## %bb.13:
	movq	(%rcx), %rdx
	movq	%rdx, 16(%rax)
	movq	%rax, (%rcx)
LBB0_14:
	movl	$1, 8(%rax)
LBB0_17:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thread_head,24,3               ## @thread_head
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal error in thread database."

	.comm	_deleted_threads,24,3           ## @deleted_threads
	.comm	_debug_on,8,3                   ## @debug_on
	.no_dead_strip	_del_tthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function del_tthread
_del_tthread:                           ; @del_tthread
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x9, _thread_head@GOTPAGE
Lloh1:
	ldr	x9, [x9, _thread_head@GOTPAGEOFF]
	ldr	x8, [x9]
	subs	x10, x8, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_14
; %bb.2:
	ldr	x11, [x8]
	cmp	x11, x0
	b.ne	LBB0_5
; %bb.3:
	mov	x12, #0
	b	LBB0_8
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	_error
LBB0_5:
	mov	x11, x8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x11, #32]
	cbz	x8, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x13, [x8]
	mov	x12, x11
	mov	x11, x8
	cmp	x13, x0
	b.ne	LBB0_6
LBB0_8:
	ldr	x11, [x8, #24]
	cbz	x11, LBB0_15
; %bb.9:
	ldr	x13, [x9, #16]
	cbz	x13, LBB0_15
; %bb.10:
	mov	x15, #0
	add	x14, x9, #16
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x13, [x13, #32]
	mov	x15, x0
	cbz	x13, LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x13
	cmp	x13, x8
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x16, [x8, #16]
	add	x17, x15, #32
	cmp	x15, #0
	csel	x17, x14, x17, eq
	str	x16, [x17]
	mov	x0, x15
	b	LBB0_11
LBB0_14:
	ret
LBB0_15:
	str	x10, [x9], #8
	ldr	x10, [x8, #32]
	add	x13, x12, #32
	cmp	x12, #0
	csel	x9, x9, x13, eq
	str	x10, [x9]
Lloh4:
	adrp	x9, _deleted_threads@GOTPAGE
Lloh5:
	ldr	x9, [x9, _deleted_threads@GOTPAGEOFF]
	ldr	x10, [x9, #16]
	str	x10, [x8, #32]
	str	x8, [x9, #16]
	ldr	w10, [x9, #8]
	add	w10, w10, #1
	str	w10, [x9, #8]
	cbz	x11, LBB0_17
; %bb.16:
	ldr	x10, [x9]
	str	x10, [x8, #16]
	str	x8, [x9]
LBB0_17:
	mov	w9, #1
	str	w9, [x8, #8]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_thread_head,24,3               ; @thread_head
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal error in thread database."

	.comm	_deleted_threads,24,3           ; @deleted_threads
	.comm	_debug_on,8,3                   ; @debug_on
	.no_dead_strip	_del_tthread
.subsections_via_symbols
