	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___libc_allocate_tls            ## -- Begin function __libc_allocate_tls
	.p2align	4, 0x90
___libc_allocate_tls:                   ## @__libc_allocate_tls
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_tls_init_align@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	callq	_MAX
	movq	%rax, %r13
	movq	_tls_static_space@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_roundup2
	movq	%rax, %r15
	cmpq	$9, %r12
	movl	$8, %ebx
	cmovaeq	%r12, %rbx
	addq	%rax, %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_malloc_aligned
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movl	$12, %edi
	callq	___je_bootstrap_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	addq	%r15, %r12
	movslq	%r12d, %r15
	movl	%r15d, (%r15)
	movl	%eax, 4(%r15)
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, (%rax)
	movq	_tls_static_space@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r15d, %ecx
	subl	%edx, %ecx
	movl	%ecx, 8(%rax)
	movslq	%ecx, %rdi
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movl	%r14d, %eax
	subl	%edx, %eax
	movslq	%eax, %rsi
	callq	_memcpy
	movq	%r14, %rdi
	movl	$8, %esi
	movl	$4, %edx
	callq	__rtld_free_tls
	jmp	LBB0_5
LBB0_4:
	movq	_tls_init@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_tls_init_size@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_memcpy
	movl	(%rbx), %edx
	subl	%edx, %r12d
	movl	(%r14), %eax
	addl	%eax, %r12d
	movslq	%r12d, %rdi
	subl	%eax, %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_5:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_tls_msg
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_tls_init_align,4,2             ## @tls_init_align
	.comm	_tls_static_space,4,2           ## @tls_static_space
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"__libc_allocate_tls: Out of memory.\n"

	.comm	_tls_init,8,3                   ## @tls_init
	.comm	_tls_init_size,4,2              ## @tls_init_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___libc_allocate_tls            ; -- Begin function __libc_allocate_tls
	.p2align	2
___libc_allocate_tls:                   ; @__libc_allocate_tls
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _tls_init_align@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tls_init_align@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_MAX
	mov	x23, x0
Lloh3:
	adrp	x24, _tls_static_space@GOTPAGE
Lloh4:
	ldr	x24, [x24, _tls_static_space@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x23
	bl	_roundup2
	mov	x20, x0
	mov	w8, #8
	cmp	x21, #8
	csel	x8, x21, x8, hi
	add	x22, x0, x8
	mov	x0, x22
	mov	x1, x23
	bl	_malloc_aligned
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	mov	w0, #12
	bl	___je_bootstrap_malloc
	cbz	x0, LBB0_6
; %bb.2:
	add	x21, x21, x20
	sxtw	x20, w21
	stp	w21, w0, [x20]
	movi.2s	v0, #1
	str	d0, [x0]
	ldr	w2, [x24]
	sub	w8, w21, w2
	str	w8, [x0, #8]
	cbz	x19, LBB0_4
; %bb.3:
	sxtw	x0, w8
	sub	w8, w19, w2
	sxtw	x1, w8
	bl	_memcpy
	mov	x0, x19
	mov	w1, #8
	mov	w2, #4
	bl	__rtld_free_tls
	b	LBB0_5
LBB0_4:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x0, w8
Lloh5:
	adrp	x8, _tls_init@GOTPAGE
Lloh6:
	ldr	x8, [x8, _tls_init@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
Lloh8:
	adrp	x19, _tls_init_size@GOTPAGE
Lloh9:
	ldr	x19, [x19, _tls_init_size@GOTPAGEOFF]
	ldr	w2, [x19]
	bl	_memcpy
	ldr	w8, [x24]
	ldr	w9, [x19]
	sub	w10, w21, w8
	add	w10, w10, w9
	sxtw	x0, w10
	sub	w2, w8, w9
	mov	w1, #0
	bl	_memset
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tls_msg
	bl	_abort
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_tls_init_align,4,2             ; @tls_init_align
	.comm	_tls_static_space,4,2           ; @tls_static_space
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"__libc_allocate_tls: Out of memory.\n"

	.comm	_tls_init,8,3                   ; @tls_init
	.comm	_tls_init_size,4,2              ; @tls_init_size
.subsections_via_symbols
