	.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_2
## %bb.1:
	movl	%edx, %r15d
	testl	%edx, %edx
	je	LBB0_2
## %bb.3:
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	movq	%rax, %r13
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rax
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	movq	_PTHREAD_PROCESS_PRIVATE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movl	%esi, 16(%r13)
	movl	%r15d, 4(%r13)
	movl	%r15d, (%r13)
	movq	$0, 24(%r13)
	movq	8(%r13), %rdi
	xorl	%edx, %edx
	callq	_sem_init
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	movq	8(%r13), %rdi
	addq	$4, %rdi
	movl	16(%r13), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_sem_init
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	8(%r13), %rdi
	callq	_sem_destroy
LBB0_11:
	movq	%r13, %rdi
	callq	_free
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r13, (%r14)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_PROCESS_PRIVATE,4,2    ## @PTHREAD_PROCESS_PRIVATE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.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_10
; %bb.1:
	mov	x21, x2
	cbz	w2, LBB0_10
; %bb.2:
	mov	x22, x1
	mov	x19, x0
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
Lloh0:
	adrp	x8, _PTHREAD_PROCESS_PRIVATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_PROCESS_PRIVATE@GOTPAGEOFF]
	cbz	x22, LBB0_5
; %bb.4:
	ldr	x9, [x22]
	cmp	x9, #0
	csel	x8, x8, x9, eq
LBB0_5:
	ldr	w1, [x8]
	str	w1, [x20, #16]
	stp	w21, w21, [x20]
	str	xzr, [x20, #24]
	ldr	x0, [x20, #8]
	mov	w2, #0
	bl	_sem_init
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x20, #8]
	add	x0, x8, #4
	ldr	w1, [x20, #16]
	mov	w2, #0
	bl	_sem_init
	cbz	x0, LBB0_13
; %bb.7:
	ldr	x0, [x20, #8]
	bl	_sem_destroy
LBB0_8:
	mov	x0, x20
	bl	_free
LBB0_9:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	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_13:
	str	x20, [x19]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_PROCESS_PRIVATE,4,2    ; @PTHREAD_PROCESS_PRIVATE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
