	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_barrier_init          ## -- Begin function _pthread_barrier_init
	.p2align	4, 0x90
__pthread_barrier_init:                 ## @_pthread_barrier_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	%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
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movl	%edx, %r14d
	testl	%edx, %edx
	je	LBB0_3
## %bb.2:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jb	LBB0_3
## %bb.4:
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.5:
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rax), %rax
	movq	_PTHREAD_PROCESS_PRIVATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_7:
	movl	$1, %edi
	movl	$4, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movb	$1, %r13b
	movq	%rax, %r15
	jmp	LBB0_13
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_10:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	___thr_pshared_offpage
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r15
	movq	_THR_PSHARED_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r13d, %r13d
LBB0_13:
	movq	%rax, (%rbx)
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	__thr_umutex_init
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	callq	__thr_ucond_init
	testb	%r13b, %r13b
	jne	LBB0_15
## %bb.14:
	movq	_USYNC_PROCESS_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	orl	%eax, (%rbx)
LBB0_15:
	movl	%r14d, (%r15)
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_PROCESS_PRIVATE,8,3    ## @PTHREAD_PROCESS_PRIVATE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_THR_PSHARED_PTR,8,3            ## @THR_PSHARED_PTR
	.comm	_USYNC_PROCESS_SHARED,4,2       ## @USYNC_PROCESS_SHARED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_barrier_init          ; -- Begin function _pthread_barrier_init
	.p2align	2
__pthread_barrier_init:                 ; @_pthread_barrier_init
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x2
	cbz	w2, LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.lo	LBB0_8
; %bb.3:
	mov	x20, x0
	cbz	x1, LBB0_6
; %bb.4:
	ldr	x8, [x1]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PTHREAD_PROCESS_PRIVATE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PTHREAD_PROCESS_PRIVATE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_6:
	mov	w22, #1
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
	cbz	x0, LBB0_9
; %bb.7:
	mov	x21, x0
	b	LBB0_12
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_10:
	mov	x0, x20
	mov	w1, #1
	bl	___thr_pshared_offpage
	cbz	x0, LBB0_16
; %bb.11:
	mov	x21, x0
	mov	w22, #0
Lloh12:
	adrp	x8, _THR_PSHARED_PTR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _THR_PSHARED_PTR@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
LBB0_12:
	str	x0, [x20]
	add	x0, x21, #8
	bl	__thr_umutex_init
	add	x20, x21, #4
	mov	x0, x20
	bl	__thr_ucond_init
	tbnz	w22, #0, LBB0_14
; %bb.13:
Lloh15:
	adrp	x8, _USYNC_PROCESS_SHARED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USYNC_PROCESS_SHARED@GOTPAGEOFF]
	ldr	d0, [x20]
	ld1r.2s	{ v1 }, [x8]
	orr.8b	v0, v0, v1
	str	d0, [x20]
LBB0_14:
	mov	w0, #0
	str	w19, [x21]
LBB0_15:
	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
LBB0_16:
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_PROCESS_PRIVATE,8,3    ; @PTHREAD_PROCESS_PRIVATE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_THR_PSHARED_PTR,8,3            ; @THR_PSHARED_PTR
	.comm	_USYNC_PROCESS_SHARED,4,2       ; @USYNC_PROCESS_SHARED
.subsections_via_symbols
