	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tr2tls_create_self             ## -- Begin function tr2tls_create_self
	.p2align	4, 0x90
_tr2tls_create_self:                    ## @tr2tls_create_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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$40, %esi
	callq	_xcalloc
	movq	%rax, %rbx
	movq	_TR2_REGION_NESTING_INITIAL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
	movl	$4, %esi
	callq	_xcalloc
	movq	%rax, 32(%rbx)
	movslq	24(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 24(%rbx)
	movl	%r15d, (%rax,%rcx,4)
	movq	_tr2_next_thread_id@GOTPCREL(%rip), %rdi
	callq	_tr2tls_locked_increment
	movq	%rax, 16(%rbx)
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_strbuf_init
	movq	16(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strbuf_addf
LBB0_2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strbuf_addstr
	movq	_TR2_MAX_THREAD_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, (%r15)
	jle	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_strbuf_setlen
LBB0_4:
	movq	_tr2tls_key@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_pthread_setspecific
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TR2_REGION_NESTING_INITIAL_SIZE,4,2 ## @TR2_REGION_NESTING_INITIAL_SIZE
	.comm	_tr2_next_thread_id,4,2         ## @tr2_next_thread_id
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"th%02d:"

	.comm	_TR2_MAX_THREAD_NAME,8,3        ## @TR2_MAX_THREAD_NAME
	.comm	_tr2tls_key,4,2                 ## @tr2tls_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tr2tls_create_self             ; -- Begin function tr2tls_create_self
	.p2align	2
_tr2tls_create_self:                    ; @tr2tls_create_self
	.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	x20, x0
	mov	w0, #1
	mov	w1, #40
	bl	_xcalloc
	mov	x19, x0
Lloh0:
	adrp	x8, _TR2_REGION_NESTING_INITIAL_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TR2_REGION_NESTING_INITIAL_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	w0, [x19]
	mov	w1, #4
	bl	_xcalloc
	str	x0, [x19, #32]
	ldrsw	x8, [x19, #24]
	add	w9, w8, #1
	str	w9, [x19, #24]
	str	w21, [x0, x8, lsl #2]
Lloh3:
	adrp	x0, _tr2_next_thread_id@GOTPAGE
Lloh4:
	ldr	x0, [x0, _tr2_next_thread_id@GOTPAGEOFF]
	bl	_tr2tls_locked_increment
	str	x0, [x19, #16]
	add	x21, x19, #8
	mov	x0, x21
	mov	w1, #0
	bl	_strbuf_init
	ldr	x2, [x19, #16]
	cbz	x2, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strbuf_addf
LBB0_2:
	mov	x0, x21
	mov	x1, x20
	bl	_strbuf_addstr
	ldr	x8, [x21]
Lloh7:
	adrp	x9, _TR2_MAX_THREAD_NAME@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TR2_MAX_THREAD_NAME@GOTPAGEOFF]
Lloh9:
	ldr	x1, [x9]
	cmp	x8, x1
	b.le	LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_strbuf_setlen
LBB0_4:
Lloh10:
	adrp	x8, _tr2tls_key@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tr2tls_key@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_pthread_setspecific
	mov	x0, 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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_TR2_REGION_NESTING_INITIAL_SIZE,4,2 ; @TR2_REGION_NESTING_INITIAL_SIZE
	.comm	_tr2_next_thread_id,4,2         ; @tr2_next_thread_id
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"th%02d:"

	.comm	_TR2_MAX_THREAD_NAME,8,3        ; @TR2_MAX_THREAD_NAME
	.comm	_tr2tls_key,4,2                 ; @tr2tls_key
.subsections_via_symbols
