	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_key_delete                ## -- Begin function _thr_key_delete
	.p2align	4, 0x90
__thr_key_delete:                       ## @_thr_key_delete
	.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
	movl	%edi, %ebx
	decl	%ebx
	movq	_PTHREAD_KEYS_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r14
	movq	__keytable_lock@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_THR_LOCK_ACQUIRE
	movq	__thread_keytable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_4
## %bb.3:
	movq	$0, (%rax,%rcx,8)
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_5:
	movq	__keytable_lock@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_THR_LOCK_RELEASE
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTHREAD_KEYS_MAX,4,2           ## @PTHREAD_KEYS_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	__keytable_lock,4,2             ## @_keytable_lock
	.comm	__thread_keytable,8,3           ## @_thread_keytable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_key_delete                ; -- Begin function _thr_key_delete
	.p2align	2
__thr_key_delete:                       ; @_thr_key_delete
	.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
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x21, x8, #1
Lloh0:
	adrp	x8, _PTHREAD_KEYS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_KEYS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.hs	LBB0_3
; %bb.1:
	bl	__get_curthread
	mov	x19, x0
Lloh3:
	adrp	x1, __keytable_lock@GOTPAGE
Lloh4:
	ldr	x1, [x1, __keytable_lock@GOTPAGEOFF]
	bl	_THR_LOCK_ACQUIRE
Lloh5:
	adrp	x8, __thread_keytable@GOTPAGE
Lloh6:
	ldr	x8, [x8, __thread_keytable@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x8, x21, lsl #3]
	cbz	x9, LBB0_4
; %bb.2:
	mov	w20, #0
	str	xzr, [x8, x21, lsl #3]
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
LBB0_5:
Lloh14:
	adrp	x1, __keytable_lock@GOTPAGE
Lloh15:
	ldr	x1, [x1, __keytable_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_THR_LOCK_RELEASE
LBB0_6:
	mov	x0, 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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PTHREAD_KEYS_MAX,4,2           ; @PTHREAD_KEYS_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	__keytable_lock,4,2             ; @_keytable_lock
	.comm	__thread_keytable,8,3           ; @_thread_keytable
.subsections_via_symbols
