	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_self                   ## -- Begin function pthread_self
	.p2align	4, 0x90
_pthread_self:                          ## @pthread_self
	.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	_pte_selfThreadKey@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_pthread_getspecific
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	jmp	LBB0_4
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pte_new
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r14
	movl	$1, (%rax)
	movq	_PTHREAD_CREATE_DETACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	xorl	%eax, %eax
	callq	_pte_osThreadGetHandle
	movl	%eax, 16(%r14)
	movq	$0, 8(%r14)
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_pthread_setspecific
	movq	%r14, %rbx
LBB0_4:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pte_selfThreadKey,4,2          ## @pte_selfThreadKey
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ## @PTHREAD_CREATE_DETACHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_self                   ; -- Begin function pthread_self
	.p2align	2
_pthread_self:                          ; @pthread_self
	.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
Lloh0:
	adrp	x20, _pte_selfThreadKey@GOTPAGE
Lloh1:
	ldr	x20, [x20, _pte_selfThreadKey@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_pthread_getspecific
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	b	LBB0_4
LBB0_2:
	bl	_pte_new
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
Lloh2:
	adrp	x8, _PTHREAD_CREATE_DETACHED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PTHREAD_CREATE_DETACHED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	bl	_pte_osThreadGetHandle
	str	w0, [x19, #16]
	str	xzr, [x19, #8]
	ldr	w0, [x20]
	mov	x1, x19
	bl	_pthread_setspecific
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_pte_selfThreadKey,4,2          ; @pte_selfThreadKey
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ; @PTHREAD_CREATE_DETACHED
.subsections_via_symbols
