	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_once                      ## -- Begin function _thr_once
	.p2align	4, 0x90
__thr_once:                             ## @_thr_once
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	__thr_check_init
	movl	(%rbx), %esi
	movq	_ONCE_DONE@GOTPCREL(%rip), %r13
	cmpl	(%r13), %esi
	jne	LBB0_1
LBB0_11:
	xorl	%eax, %eax
	callq	_atomic_thread_fence_acq
	xorl	%r14d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ONCE_NEVER_DONE@GOTPCREL(%rip), %r12
	movq	_ONCE_IN_PROGRESS@GOTPCREL(%rip), %r15
	movq	_ONCE_WAIT@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_atomic_cmpset_int
	testq	%rax, %rax
	jne	LBB0_4
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %esi
	cmpl	(%r13), %esi
	je	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	cmpl	(%r12), %esi
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %eax
	cmpl	%edx, %esi
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_atomic_cmpset_int
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %esi
	jne	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	__thr_umtx_wait_uint
	jmp	LBB0_10
LBB0_4:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r12
	movq	_once_cancel_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_THR_CLEANUP_PUSH
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_THR_CLEANUP_POP
	movl	(%r15), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_atomic_cmpset_rel_int
	testq	%rax, %rax
	jne	LBB0_14
## %bb.5:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_atomic_store_rel_int
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	__thr_umtx_wake
	jmp	LBB0_14
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ONCE_DONE,4,2                  ## @ONCE_DONE
	.comm	_ONCE_NEVER_DONE,4,2            ## @ONCE_NEVER_DONE
	.comm	_ONCE_IN_PROGRESS,4,2           ## @ONCE_IN_PROGRESS
	.comm	_ONCE_WAIT,4,2                  ## @ONCE_WAIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_once_cancel_handler,4,2        ## @once_cancel_handler
	.comm	_INT_MAX,4,2                    ## @INT_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_once                      ; -- Begin function _thr_once
	.p2align	2
__thr_once:                             ; @_thr_once
	.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	x20, x1
	mov	x19, x0
	bl	__thr_check_init
	ldr	w1, [x19]
Lloh0:
	adrp	x22, _ONCE_DONE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ONCE_DONE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w1, w8
	b.ne	LBB0_4
LBB0_1:
	bl	_atomic_thread_fence_acq
LBB0_2:
	mov	w0, #0
LBB0_3:
	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_4:
Lloh2:
	adrp	x21, _ONCE_NEVER_DONE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ONCE_NEVER_DONE@GOTPAGEOFF]
Lloh4:
	adrp	x23, _ONCE_IN_PROGRESS@GOTPAGE
Lloh5:
	ldr	x23, [x23, _ONCE_IN_PROGRESS@GOTPAGEOFF]
Lloh6:
	adrp	x24, _ONCE_WAIT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ONCE_WAIT@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_atomic_cmpset_int
	cbnz	x0, LBB0_13
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x19]
	ldr	w8, [x22]
	cmp	w1, w8
	b.eq	LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	ldr	w2, [x23]
	cmp	w1, w8
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x24]
	cmp	w1, w2
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x2, x8
	bl	_atomic_cmpset_int
	cbz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x24]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w1, w8
	b.ne	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	__thr_umtx_wait_uint
	b	LBB0_6
LBB0_13:
	bl	__get_curthread
	mov	x21, x0
Lloh8:
	adrp	x8, _once_cancel_handler@GOTPAGE
Lloh9:
	ldr	x8, [x8, _once_cancel_handler@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_THR_CLEANUP_PUSH
	blr	x20
	mov	x0, x21
	mov	w1, #0
	bl	_THR_CLEANUP_POP
	ldr	w1, [x23]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_atomic_cmpset_rel_int
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_3
; %bb.14:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_atomic_store_rel_int
Lloh11:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	__thr_umtx_wake
	b	LBB0_2
LBB0_15:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ONCE_DONE,4,2                  ; @ONCE_DONE
	.comm	_ONCE_NEVER_DONE,4,2            ; @ONCE_NEVER_DONE
	.comm	_ONCE_IN_PROGRESS,4,2           ; @ONCE_IN_PROGRESS
	.comm	_ONCE_WAIT,4,2                  ; @ONCE_WAIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_once_cancel_handler,4,2        ; @once_cancel_handler
	.comm	_INT_MAX,4,2                    ; @INT_MAX
.subsections_via_symbols
