	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_spin_init             ## -- Begin function _pthread_spin_init
	.p2align	4, 0x90
__pthread_spin_init:                    ## @_pthread_spin_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_PTHREAD_PROCESS_PRIVATE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.2:
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_PTHREAD_PROCESS_SHARED@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	___thr_pshared_offpage
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %rdi
	movq	_THR_PSHARED_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_7:
	movq	%rax, (%rbx)
	callq	__thr_umutex_init
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_PROCESS_PRIVATE,4,2    ## @PTHREAD_PROCESS_PRIVATE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PTHREAD_PROCESS_SHARED,4,2     ## @PTHREAD_PROCESS_SHARED
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_THR_PSHARED_PTR,8,3            ## @THR_PSHARED_PTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_spin_init             ; -- Begin function _pthread_spin_init
	.p2align	2
__pthread_spin_init:                    ; @_pthread_spin_init
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _PTHREAD_PROCESS_PRIVATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_PROCESS_PRIVATE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #4
	bl	_malloc
	mov	x8, x0
	cbnz	x0, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x8, _PTHREAD_PROCESS_SHARED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTHREAD_PROCESS_SHARED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	___thr_pshared_offpage
	cbz	x0, LBB0_11
; %bb.6:
Lloh8:
	adrp	x8, _THR_PSHARED_PTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _THR_PSHARED_PTR@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
LBB0_7:
	str	x8, [x19]
	bl	__thr_umutex_init
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh13:
	adrp	x8, _EFAULT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_PROCESS_PRIVATE,4,2    ; @PTHREAD_PROCESS_PRIVATE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PTHREAD_PROCESS_SHARED,4,2     ; @PTHREAD_PROCESS_SHARED
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_THR_PSHARED_PTR,8,3            ; @THR_PSHARED_PTR
.subsections_via_symbols
