	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_allocate_tls_offset            ## -- Begin function allocate_tls_offset
	.p2align	4, 0x90
_allocate_tls_offset:                   ## @allocate_tls_offset
	.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
	movl	$1, %eax
	cmpl	$0, (%rdi)
	jne	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movl	24(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_10
## %bb.2:
	movq	_tls_last_offset@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.4:
	movq	_tls_last_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rcx
	callq	_calculate_tls_offset
	jmp	LBB0_5
LBB0_3:
	movq	8(%rbx), %rsi
	movl	%edx, %edi
	callq	_calculate_first_tls_offset
LBB0_5:
	movq	%rax, %r14
	movq	_tls_static_space@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.6:
	movl	24(%rbx), %esi
	movq	%r14, %rdi
	callq	_calculate_tls_end
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	(%r12), %rcx
	jle	LBB0_9
	jmp	LBB0_11
LBB0_7:
	movq	8(%rbx), %rax
	movq	_tls_static_max_align@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_9
## %bb.8:
	movq	%rax, (%rcx)
LBB0_9:
	movq	%r14, 16(%rbx)
	movq	%r14, (%r15)
	movl	24(%rbx), %eax
	movq	_tls_last_size@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_10:
	movl	$1, (%rbx)
	movl	$1, %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tls_last_offset,8,3            ## @tls_last_offset
	.comm	_tls_last_size,4,2              ## @tls_last_size
	.comm	_tls_static_space,8,3           ## @tls_static_space
	.comm	_tls_static_max_align,8,3       ## @tls_static_max_align
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_allocate_tls_offset            ; -- Begin function allocate_tls_offset
	.p2align	2
_allocate_tls_offset:                   ; @allocate_tls_offset
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_13
LBB0_2:
	mov	x19, x0
	ldr	w2, [x0, #24]
	cbz	w2, LBB0_12
; %bb.3:
Lloh0:
	adrp	x21, _tls_last_offset@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tls_last_offset@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh2:
	adrp	x22, _tls_last_size@GOTPAGE
Lloh3:
	ldr	x22, [x22, _tls_last_size@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x22]
	ldr	x3, [x19, #8]
	bl	_calculate_tls_offset
	b	LBB0_6
LBB0_5:
	ldr	x1, [x19, #8]
	mov	x0, x2
	bl	_calculate_first_tls_offset
LBB0_6:
	mov	x20, x0
Lloh4:
	adrp	x23, _tls_static_space@GOTPAGE
Lloh5:
	ldr	x23, [x23, _tls_static_space@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w1, [x19, #24]
	mov	x0, x20
	bl	_calculate_tls_end
	ldr	x8, [x23]
	cmp	x0, x8
	b.le	LBB0_11
; %bb.8:
	mov	w0, #0
	b	LBB0_13
LBB0_9:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _tls_static_max_align@GOTPAGE
Lloh7:
	ldr	x9, [x9, _tls_static_max_align@GOTPAGEOFF]
	ldr	x10, [x9]
	cmp	x8, x10
	b.le	LBB0_11
; %bb.10:
	str	x8, [x9]
LBB0_11:
	str	x20, [x19, #16]
	str	x20, [x21]
	ldr	w8, [x19, #24]
	str	w8, [x22]
LBB0_12:
	mov	w0, #1
	str	w0, [x19]
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_tls_last_offset,8,3            ; @tls_last_offset
	.comm	_tls_last_size,4,2              ; @tls_last_size
	.comm	_tls_static_space,8,3           ; @tls_static_space
	.comm	_tls_static_max_align,8,3       ; @tls_static_max_align
.subsections_via_symbols
