	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_key_create                ## -- Begin function _thr_key_create
	.p2align	4, 0x90
__thr_key_create:                       ## @_thr_key_create
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	__thr_check_init
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r12
	movq	__keytable_lock@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_THR_LOCK_ACQUIRE
	movq	_PTHREAD_KEYS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_5
## %bb.1:
	movq	__thread_keytable@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	shlq	$3, %rdx
	leaq	(%rdx,%rdx,2), %rsi
	movl	$1, %ebx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rcx,%rdx)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %rdx
	incl	%ebx
	cmpq	%rdx, %rsi
	jne	LBB0_2
LBB0_5:
	movq	__keytable_lock@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_THR_LOCK_RELEASE
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_3:
	movl	$1, (%rcx,%rdx)
	movq	%r15, 8(%rcx,%rdx)
	movq	(%rax), %rax
	incl	16(%rax,%rdx)
	movq	__keytable_lock@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_THR_LOCK_RELEASE
	movl	%ebx, (%r14)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__keytable_lock,4,2             ## @_keytable_lock
	.comm	_PTHREAD_KEYS_MAX,4,2           ## @PTHREAD_KEYS_MAX
	.comm	__thread_keytable,8,3           ## @_thread_keytable
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_key_create                ; -- Begin function _thr_key_create
	.p2align	2
__thr_key_create:                       ; @_thr_key_create
	.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	x21, x1
	mov	x19, x0
	bl	__thr_check_init
	bl	__get_curthread
	mov	x20, x0
Lloh0:
	adrp	x1, __keytable_lock@GOTPAGE
Lloh1:
	ldr	x1, [x1, __keytable_lock@GOTPAGEOFF]
	bl	_THR_LOCK_ACQUIRE
Lloh2:
	adrp	x8, _PTHREAD_KEYS_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PTHREAD_KEYS_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x8]
	cmp	w11, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
Lloh5:
	adrp	x9, __thread_keytable@GOTPAGE
Lloh6:
	ldr	x9, [x9, __thread_keytable@GOTPAGEOFF]
	ldr	x10, [x9]
	add	x11, x11, x11, lsl #1
	lsl	x11, x11, #3
	mov	w22, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10, x8]
	cbz	w12, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #24
	add	w22, w22, #1
	cmp	x11, x8
	b.ne	LBB0_2
LBB0_4:
Lloh7:
	adrp	x1, __keytable_lock@GOTPAGE
Lloh8:
	ldr	x1, [x1, __keytable_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_THR_LOCK_RELEASE
Lloh9:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
	add	x10, x10, x8
	mov	w11, #1
	str	w11, [x10]
	str	x21, [x10, #8]
	ldr	x9, [x9]
	add	x8, x9, x8
	ldr	w9, [x8, #16]
	add	w9, w9, #1
	str	w9, [x8, #16]
Lloh12:
	adrp	x1, __keytable_lock@GOTPAGE
Lloh13:
	ldr	x1, [x1, __keytable_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_THR_LOCK_RELEASE
	mov	w0, #0
	str	w22, [x19]
LBB0_6:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	__keytable_lock,4,2             ; @_keytable_lock
	.comm	_PTHREAD_KEYS_MAX,4,2           ; @PTHREAD_KEYS_MAX
	.comm	__thread_keytable,8,3           ; @_thread_keytable
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
